<?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: Get Data from cURL with Power Query in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/3311355#M106966</link>
    <description>&lt;P&gt;I recently had the same question which I have found the answer to.&lt;/P&gt;&lt;P&gt;Step 1: In Excel select Data\New Query\From Other Sources\From Web&lt;/P&gt;&lt;P&gt;Step 2: Select the "Advanced" radio button&lt;/P&gt;&lt;P&gt;Step 3: Paste the url into the "URL parts" text box&lt;/P&gt;&lt;P&gt;Step 4: Under the heading "HTTP request header parameters (optional) do the following:&lt;/P&gt;&lt;P&gt;- type in the word Authorization into the 1st dropdown box. Next to this type in the word Bearer followed by your required parameter.&amp;nbsp; It's important you include the word Bearer as well as the parameter that follows it. Eg. Bearer xyz&lt;/P&gt;&lt;P&gt;Make sure there are no quotes around it.&lt;/P&gt;&lt;P&gt;-&amp;nbsp; type in the words Content-Type into the 2nd dropdown box. Next to this type in the words application/json&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure there are no quotes around it.&lt;/P&gt;&lt;P&gt;Step 5: Click the OK button&lt;/P&gt;&lt;P&gt;Assuming that was successful this will take you into Power Query&lt;/P&gt;&lt;P&gt;Step 6:&amp;nbsp;Click on the "Source" step &amp;amp; then click on the "To Tables" button seen in the next screenshot &amp;amp; Click the "Insert" button&lt;/P&gt;&lt;P&gt;Step 7:&amp;nbsp;Then Click "Ok" as there are no delimiters.&lt;/P&gt;&lt;P&gt;Given that your question was only to do with how do you fetch data using a Curl api request using Power Query I will stop there as I will assume that with the access to the data now achieved that you know how to use Power Query to proceed further.&lt;/P&gt;&lt;P&gt;I hope this helps.&amp;nbsp; My problem now is finding out how to run many Curl api's automatically one after another.&lt;/P&gt;</description>
    <pubDate>Sun, 02 Jul 2023 07:19:09 GMT</pubDate>
    <dc:creator>Syndicate_Admin</dc:creator>
    <dc:date>2023-07-02T07:19:09Z</dc:date>
    <item>
      <title>Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2446013#M73591</link>
      <description>&lt;P&gt;Hi, I need help - I have a cURL and I need to transform it into a power query.&lt;/P&gt;&lt;P&gt;Can someone please help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --request POST \
  --url https://api.abcd.com/2/ \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'authorization: Bearer xyz' \
  --data '{"query":"query ($period: PeriodFreeInput!) { workspace (id:  \"2ihQOg3IwTBE\") { shifts ( period: $period ) { userName, userId, workTime, period { start, end }, user { email } } } }\n\n","variables":{"period":{"start":"2022-03-31T22:00:00.000Z","end":"2022-04-30T21:59:59.999Z"}}}'&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 08 Apr 2022 12:43:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2446013#M73591</guid>
      <dc:creator>Komi</dc:creator>
      <dc:date>2022-04-08T12:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2447882#M73691</link>
      <description>&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/web-contents" target="_blank"&gt;Web.Contents - PowerQuery M | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Example 2&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2022 22:19:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2447882#M73691</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-04-10T22:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2448748#M73717</link>
      <description>&lt;P&gt;Thanks, I've been looking at it, unfortunately I don't know how to write the query part. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 07:54:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2448748#M73717</guid>
      <dc:creator>Komi</dc:creator>
      <dc:date>2022-04-11T07:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2449419#M73737</link>
      <description>&lt;P&gt;Without access to your API it is not possible to help you further. You can use Postman or similar for developing the required format.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 11:26:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2449419#M73737</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-04-11T11:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2649230#M81174</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an intranet website that has a button to download a file in CSV.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I use power BI to trigger this function in the website to fetch the CSV file and transform it into a table I can manipulate later? If it is doable what info you might need from me to help me? thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 04:54:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2649230#M81174</guid>
      <dc:creator>Syndicate_Admin</dc:creator>
      <dc:date>2022-07-20T04:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2650256#M81220</link>
      <description>&lt;P&gt;Please do not hijack posts. Create a new post.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 11:37:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2650256#M81220</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-07-20T11:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2650862#M81232</link>
      <description>&lt;P&gt;sorry I didn't know that. I will create a new post.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 15:31:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/2650862#M81232</guid>
      <dc:creator>Syndicate_Admin</dc:creator>
      <dc:date>2022-07-20T15:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/3311355#M106966</link>
      <description>&lt;P&gt;I recently had the same question which I have found the answer to.&lt;/P&gt;&lt;P&gt;Step 1: In Excel select Data\New Query\From Other Sources\From Web&lt;/P&gt;&lt;P&gt;Step 2: Select the "Advanced" radio button&lt;/P&gt;&lt;P&gt;Step 3: Paste the url into the "URL parts" text box&lt;/P&gt;&lt;P&gt;Step 4: Under the heading "HTTP request header parameters (optional) do the following:&lt;/P&gt;&lt;P&gt;- type in the word Authorization into the 1st dropdown box. Next to this type in the word Bearer followed by your required parameter.&amp;nbsp; It's important you include the word Bearer as well as the parameter that follows it. Eg. Bearer xyz&lt;/P&gt;&lt;P&gt;Make sure there are no quotes around it.&lt;/P&gt;&lt;P&gt;-&amp;nbsp; type in the words Content-Type into the 2nd dropdown box. Next to this type in the words application/json&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure there are no quotes around it.&lt;/P&gt;&lt;P&gt;Step 5: Click the OK button&lt;/P&gt;&lt;P&gt;Assuming that was successful this will take you into Power Query&lt;/P&gt;&lt;P&gt;Step 6:&amp;nbsp;Click on the "Source" step &amp;amp; then click on the "To Tables" button seen in the next screenshot &amp;amp; Click the "Insert" button&lt;/P&gt;&lt;P&gt;Step 7:&amp;nbsp;Then Click "Ok" as there are no delimiters.&lt;/P&gt;&lt;P&gt;Given that your question was only to do with how do you fetch data using a Curl api request using Power Query I will stop there as I will assume that with the access to the data now achieved that you know how to use Power Query to proceed further.&lt;/P&gt;&lt;P&gt;I hope this helps.&amp;nbsp; My problem now is finding out how to run many Curl api's automatically one after another.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jul 2023 07:19:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/3311355#M106966</guid>
      <dc:creator>Syndicate_Admin</dc:creator>
      <dc:date>2023-07-02T07:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/3356775#M108892</link>
      <description>&lt;P&gt;Thank you for this solution!&lt;/P&gt;&lt;P&gt;I tried to use it to access HomeAssistant using the API interface.&lt;/P&gt;&lt;P&gt;The Curl-Statement is as follows and works fine:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....." \
  -H "Content-Type: application/json" \
  http://homeassistant:8123/api/services&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I did translate it in PowerQuery to this statement:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    url = "http://homeassistant:8123/api/services",
    headers = [Authorization="Bearer eyJhbGciOiJIUzI1NiIsInR5cC....", 
               #"Content-Type"="application/json"],
    response = Web.Contents(
        url,
        [ Headers = headers ]
    ),
    jsonResponse = Json.Document(response)
in
    jsonResponse&lt;/LI-CODE&gt;&lt;P&gt;but only got this message:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Unerwarteter Fehler.: Die Blocklänge stimmt nicht mit ihrem Komplement überein.
Details:
    Microsoft.Mashup.Evaluator.Interface.ErrorException: Die Blocklänge stimmt nicht mit ihrem Komplement überein. ---&amp;gt; 
Microsoft.Mashup.Evaluator.Interface.ErrorException: Die Blocklänge stimmt nicht mit ihrem Komplement überein. ---&amp;gt; 
Microsoft.Mashup.Evaluator.Interface.ErrorException: Die Blocklänge stimmt nicht mit ihrem Komplement überein. ---&amp;gt; 
Microsoft.Mashup.Evaluator.Interface.ErrorException: Die Blocklänge stimmt nicht mit ihrem Komplement überein. ---&amp;gt; 
Microsoft.Mashup.Evaluator.Interface.ErrorException: Die Blocklänge stimmt nicht mit ihrem Komplement überein. ---&amp;gt; 
System.IO.InvalidDataException: Die Blocklänge stimmt nicht mit ihrem Komplement überein. ---&amp;gt;
System.IO.InvalidDataException: Die Blocklänge stimmt nicht mit ihrem Komplement überein.
   bei System.IO.Mashup.Compression.Inflater.DecodeUncompressedBlock(Boolean&amp;amp; end_of_block)
   bei System.IO.Mashup.Compression.Inflater.Decode()
   bei System.IO.Mashup.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset, Int32 length)
.........................&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Sorry, the error message is in german. It reads something like&lt;/P&gt;&lt;P&gt;"Unexpected Error. The block length does not match its complement."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea what is wrong with my code ?&lt;/P&gt;&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2023 11:22:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/3356775#M108892</guid>
      <dc:creator>simcla</dc:creator>
      <dc:date>2023-07-30T11:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/3365895#M109250</link>
      <description>&lt;P&gt;In the meanwhile I found a solution.&amp;nbsp;You have to add&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#"Accept-Encoding" = "gzip"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;to your code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    url = "http://homeassistant:8123/api/history/period?filter_entity_id=sensor.xxxxx",
    headers = [Authorization="Bearer eyJhbGciOiJIUzI1NiIsI....", 
               #"Content-Type"="application/json",
               #"Accept-Encoding" = "gzip"],
    response = Web.Contents(
        url,
        [ Headers = headers ]
    ), ............................&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks to&amp;nbsp;Chris Webb!&lt;/P&gt;&lt;P&gt;&lt;A href="https://blog.crossjoin.co.uk/2023/02/05/the-block-length-does-not-match-with-its-complement-error-in-power-query-in-power-bi-and-excel/#:~:text=Error%3A%20Block%20length%20does%20not%20match%20with%20its%20complement.&amp;amp;text=The%20problem%20is%20caused%20by,NET%20functionality" target="_blank"&gt;https://blog.crossjoin.co.uk/2023/02/05/the-block-length-does-not-match-with-its-complement-error-in-power-query-in-power-bi-and-excel/#:~:text=Error%3A%20Block%20length%20does%20not%20match%20with%20its%20complement.&amp;amp;text=The%20problem%20is%20caused%20by,NET%20functionality&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 17:08:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/3365895#M109250</guid>
      <dc:creator>simcla</dc:creator>
      <dc:date>2023-08-04T17:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get Data from cURL with Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/4418685#M146650</link>
      <description>&lt;P&gt;Thank you for this solution. I was looking for running multiline curl to fetch Problems data from Dynatrace using Excel. It worked!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 02:40:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Get-Data-from-cURL-with-Power-Query/m-p/4418685#M146650</guid>
      <dc:creator>kanchalwar</dc:creator>
      <dc:date>2025-02-20T02:40:53Z</dc:date>
    </item>
  </channel>
</rss>

