<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Microsoft Fabric Notebook - API - WABI in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4424032#M59618</link>
    <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/935103"&gt;@mtoarantes&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Thank you for your detailed response. Based on my search, I personally recommend using the service principal method to call the following types of REST APIs, as this is our preferred approach.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_6-1740385862688.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1243165iCD37097F71F51AB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_6-1740385862688.png" alt="vlinyulumsft_6-1740385862688.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/core/items" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Items - REST API (Core) | Microsoft Learn&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;Below are screenshots and links related to issues with similar port calls:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_5-1740385835222.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1243164iED25C52AFFE4EF6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_5-1740385835222.png" alt="vlinyulumsft_5-1740385835222.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_4-1740385823767.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1243163i98C1544DE5051366/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_4-1740385823767.png" alt="vlinyulumsft_4-1740385823767.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;For more details, please refer to:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Power-BI-API-return-unexpexted-result/m-p/2528696" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Solved: Power BI API - return unexpexted result - Microsoft Fabric Community&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Service/Is-there-anyone-familiar-with-https-wabi-us-north-central-d/m-p/3208201" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Solved: Re: Is there anyone familiar with: https://wabi-us... - Microsoft Fabric Community&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Getting-Token-for-API-Dataflow-Gateway-Binding/m-p/2343253" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Solved: Getting Token for API Dataflow Gateway Binding - Microsoft Fabric Community&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Leroy Lu&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider Accept it &lt;EM&gt;&lt;STRONG&gt;as the solution &lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2025 08:31:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-02-24T08:31:41Z</dc:date>
    <item>
      <title>Microsoft Fabric Notebook - API - WABI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4418293#M59576</link>
      <description>&lt;H2&gt;Endpoint URL - wabi-east-us-redirect.analysis.windows.net/metadata/monitoringhub&lt;/H2&gt;&lt;P&gt;Hello Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know how can i get access in this endpoint cause when i try to connect i get a message error about Timeout ..&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 19:46:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4418293#M59576</guid>
      <dc:creator>mtoarantes</dc:creator>
      <dc:date>2025-02-19T19:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft Fabric Notebook - API - WABI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4419123#M59589</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/935103"&gt;@mtoarantes&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Are you encountering errors when connecting to the Lakehouse via the SQL Analytics endpoint? If so, this might be related to the large volume of data causing M language query processing to time out. You can resolve this issue by setting the CommandTimeout. Here are some relevant answers that might help you:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_0-1740035475395.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1241546iA83600D49ABF7BDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_0-1740035475395.png" alt="vlinyulumsft_0-1740035475395.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For more details, please refer to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-set-command-timeout-option/m-p/487941" target="_blank"&gt;&lt;SPAN&gt;Solved: How to set command timeout option - Microsoft Fabric Community&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the error occurs during an API call, please check if the API you are using supports Long Running Operations. Here are some relevant document screenshots:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_1-1740035475396.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1241545i7790B989581D048F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_1-1740035475396.png" alt="vlinyulumsft_1-1740035475396.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For more details, please refer to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/articles/long-running-operation" target="_blank"&gt;&lt;SPAN&gt;Long running operations - Microsoft Fabric REST APIs | Microsoft Learn&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/core/items/create-item?tabs=HTTP" target="_blank"&gt;&lt;SPAN&gt;Items - Create Item - REST API (Core) | Microsoft Learn&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Not-able-to-connect-to-Lakehouse-SQL-endpoint/m-p/3828679" target="_blank"&gt;&lt;SPAN&gt;Solved: Re: Not able to connect to Lakehouse SQL endpoint - Microsoft Fabric Community&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the issue is with an API call, please share which API call is causing the problem and provide more error details.Of course, if you have any new discoveries or questions, please feel free to get in touch with us.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Leroy Lu&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider Accept it &lt;STRONG&gt;&lt;I&gt;as the solution &lt;/I&gt;&lt;/STRONG&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 07:11:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4419123#M59589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-20T07:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft Fabric Notebook - API - WABI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4421843#M59600</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hello&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Thank you for the answer, bellow im putting the code about the API&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;API_ENDPOINT&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"wabi-east-us-redirect.analysis.windows.net"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;def obtener_token():&lt;BR /&gt;return mssparkutils.credentials.getToken("pbi")&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;def&lt;/SPAN&gt; &lt;SPAN&gt;cargar_datos&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;engine&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;tipo_carga&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"""Carga los datos de manera histórica o incremental según el tipo de carga"""&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; tipo_carga == &lt;/SPAN&gt;&lt;SPAN&gt;"historical"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Iniciando carga histórica"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fecha_inicio = datetime(&lt;/SPAN&gt;&lt;SPAN&gt;1970&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fecha_fin = datetime.utcnow()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Iniciando carga incremental"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_start_time = obtener_max_start_time(engine)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; max_start_time &lt;/SPAN&gt;&lt;SPAN&gt;is&lt;/SPAN&gt; &lt;SPAN&gt;None&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"No se encontró fecha máxima. Realizando carga histórica."&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cargar_datos(engine, &lt;/SPAN&gt;&lt;SPAN&gt;"historical"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fecha_inicio = max_start_time&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fecha_fin = datetime.utcnow()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; uri = &lt;/SPAN&gt;&lt;SPAN&gt;"metadata/monitoringhub/histories"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; params = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"endTime"&lt;/SPAN&gt;&lt;SPAN&gt;: fecha_fin.isoformat() + &lt;/SPAN&gt;&lt;SPAN&gt;'Z'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"startTime"&lt;/SPAN&gt;&lt;SPAN&gt;: fecha_inicio.isoformat() + &lt;/SPAN&gt;&lt;SPAN&gt;'Z'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"limit"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;50000&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; datos = invocar_api_fabric(&lt;/SPAN&gt;&lt;SPAN&gt;"GET"&lt;/SPAN&gt;&lt;SPAN&gt;, uri, &lt;/SPAN&gt;&lt;SPAN&gt;params&lt;/SPAN&gt;&lt;SPAN&gt;=params)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;'error'&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; datos:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"Error al obtener datos: &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;datos[&lt;/SPAN&gt;&lt;SPAN&gt;'error'&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"Datos obtenidos: &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;len&lt;/SPAN&gt;&lt;SPAN&gt;(datos)&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt; registros"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; df = normalizar_datos(datos)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; df_refinado = refinar_datos(df)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; tipo_carga == &lt;/SPAN&gt;&lt;SPAN&gt;"incremental"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; df_existente = obtener_datos_existentes(engine, fecha_inicio)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; df_refinado_existente = refinar_datos(df_existente)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; df_refinado = pd.concat([df_refinado_existente, df_refinado]).drop_duplicates(&lt;/SPAN&gt;&lt;SPAN&gt;keep&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; guardar_dataframe_en_bd(df_refinado, engine, &lt;/SPAN&gt;&lt;SPAN&gt;'logs'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"Finalizada la carga &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;tipo_carga&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 21 Feb 2025 11:31:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4421843#M59600</guid>
      <dc:creator>mtoarantes</dc:creator>
      <dc:date>2025-02-21T11:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft Fabric Notebook - API - WABI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4421845#M59601</link>
      <description>&lt;LI-CODE lang="python"&gt;def crear_sesion():
    """Crea una sesión de requests con reintentos"""
    sesion = requests.Session()
    reintentos = Retry(total=3, backoff_factor=5, status_forcelist=[502, 503, 504])
    adaptador = HTTPAdapter(max_retries=reintentos)
    sesion.mount('http://', adaptador)
    sesion.mount('https://', adaptador)
    return sesion

SESION = crear_sesion()

def invocar_api_fabric(metodo, uri, params=None, payload=None):
    """Invoca la API de Fabric y maneja la paginación si es necesario"""
    token = obtener_token()
    headers = {
        "Authorization": f"Bearer {token}",
        "Content-Type": "application/json"
    }
    
    todos_los_datos = []
    token_continuacion = None

    try:
        while True:
            if token_continuacion:
                params['continuationToken'] = token_continuacion
            
            url = f"https://{API_ENDPOINT}/{uri}"
            respuesta = SESION.request(metodo, url, headers=headers, params=params, json=payload, timeout=800)
            respuesta.raise_for_status()
            datos_respuesta = respuesta.json()
            
            if isinstance(datos_respuesta, list):
                todos_los_datos.extend(datos_respuesta)
            else:
                todos_los_datos.extend(datos_respuesta.get('value', []))
                token_continuacion = datos_respuesta.get('continuationToken')
            
            if not token_continuacion:
                break

        return todos_los_datos&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 21 Feb 2025 11:32:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4421845#M59601</guid>
      <dc:creator>mtoarantes</dc:creator>
      <dc:date>2025-02-21T11:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft Fabric Notebook - API - WABI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4421850#M59602</link>
      <description>&lt;H2&gt;&lt;SPAN&gt;Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(&amp;lt;urllib3.connection.HTTPSConnection object at 0x754daa1eed50&amp;gt;, 'Connection to wabi-us-east-redirect.analysis.windows.net timed out. (connect timeout=800)')': /metadata/monitoringhub/histories?endTime=2025-02-21T15%3A27%3A49.520096Z&amp;amp;startTime=2025-02-01T00%3A00%3A00Z&amp;amp;limit=50000&lt;/SPAN&gt;&lt;/H2&gt;</description>
      <pubDate>Fri, 21 Feb 2025 15:32:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4421850#M59602</guid>
      <dc:creator>mtoarantes</dc:creator>
      <dc:date>2025-02-21T15:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Microsoft Fabric Notebook - API - WABI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4424032#M59618</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/935103"&gt;@mtoarantes&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Thank you for your detailed response. Based on my search, I personally recommend using the service principal method to call the following types of REST APIs, as this is our preferred approach.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_6-1740385862688.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1243165iCD37097F71F51AB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_6-1740385862688.png" alt="vlinyulumsft_6-1740385862688.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/fabric/core/items" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Items - REST API (Core) | Microsoft Learn&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;Below are screenshots and links related to issues with similar port calls:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_5-1740385835222.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1243164iED25C52AFFE4EF6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_5-1740385835222.png" alt="vlinyulumsft_5-1740385835222.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlinyulumsft_4-1740385823767.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1243163i98C1544DE5051366/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vlinyulumsft_4-1740385823767.png" alt="vlinyulumsft_4-1740385823767.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;For more details, please refer to:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Power-BI-API-return-unexpexted-result/m-p/2528696" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Solved: Power BI API - return unexpexted result - Microsoft Fabric Community&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Service/Is-there-anyone-familiar-with-https-wabi-us-north-central-d/m-p/3208201" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Solved: Re: Is there anyone familiar with: https://wabi-us... - Microsoft Fabric Community&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/Getting-Token-for-API-Dataflow-Gateway-Binding/m-p/2343253" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Solved: Getting Token for API Dataflow Gateway Binding - Microsoft Fabric Community&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Leroy Lu&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider Accept it &lt;EM&gt;&lt;STRONG&gt;as the solution &lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 08:31:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Microsoft-Fabric-Notebook-API-WABI/m-p/4424032#M59618</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-24T08:31:41Z</dc:date>
    </item>
  </channel>
</rss>

