<?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 Connect to API via Power Query troubleshot in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4113395#M54910</link>
    <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;I'm having a little troble connecting to the Hevy app API via Power Query.&lt;/P&gt;&lt;P&gt;I've read the documentation they provide and watched other peoples videos and examples but so far I haven't had any luck.&lt;/P&gt;&lt;P&gt;I also have available the curl in the below link:&lt;/P&gt;&lt;P&gt;Here the documentation:&amp;nbsp;&lt;A href="https://api.hevyapp.com/docs/" target="_self"&gt;https://api.hevyapp.com/docs/&lt;/A&gt;&amp;nbsp; I would like to use the table "&lt;SPAN&gt;/v1/workouts/events"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PS: More info just in case&lt;STRONG&gt; (I should be able to connect using only the information below:)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;H4&gt;&lt;STRONG&gt;Curl&lt;/STRONG&gt;&lt;/H4&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;curl -X 'GET' \&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'&lt;A href="https://api.hevyapp.com/v1/workouts/events?page=1&amp;amp;pageSize=5&amp;amp;since=1970-01-01T00%3A00%3A00Z" target="_blank"&gt;https://api.hevyapp.com/v1/workouts/events?page=1&amp;amp;pageSize=5&amp;amp;since=1970-01-01T00%3A00%3A00Z&lt;/A&gt;' \&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-H 'accept: application/json' \&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-H 'api-key: 226b4150-f29f-4a5a-9438-ab91cc39e080'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H4&gt;&lt;STRONG&gt;Request URL&lt;/STRONG&gt;&lt;/H4&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;A href="https://api.hevyapp.com/v1/workouts/events?page=1&amp;amp;pageSize=5&amp;amp;since=1970-01-01T00%3A00%3A00Z" target="_blank"&gt;https://api.hevyapp.com/v1/workouts/events?page=1&amp;amp;pageSize=5&amp;amp;since=1970-01-01T00%3A00%3A00Z&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 23 Aug 2024 09:27:53 GMT</pubDate>
    <dc:creator>APIRT</dc:creator>
    <dc:date>2024-08-23T09:27:53Z</dc:date>
    <item>
      <title>Connect to API via Power Query troubleshot</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4113395#M54910</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;I'm having a little troble connecting to the Hevy app API via Power Query.&lt;/P&gt;&lt;P&gt;I've read the documentation they provide and watched other peoples videos and examples but so far I haven't had any luck.&lt;/P&gt;&lt;P&gt;I also have available the curl in the below link:&lt;/P&gt;&lt;P&gt;Here the documentation:&amp;nbsp;&lt;A href="https://api.hevyapp.com/docs/" target="_self"&gt;https://api.hevyapp.com/docs/&lt;/A&gt;&amp;nbsp; I would like to use the table "&lt;SPAN&gt;/v1/workouts/events"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PS: More info just in case&lt;STRONG&gt; (I should be able to connect using only the information below:)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;H4&gt;&lt;STRONG&gt;Curl&lt;/STRONG&gt;&lt;/H4&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;curl -X 'GET' \&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'&lt;A href="https://api.hevyapp.com/v1/workouts/events?page=1&amp;amp;pageSize=5&amp;amp;since=1970-01-01T00%3A00%3A00Z" target="_blank"&gt;https://api.hevyapp.com/v1/workouts/events?page=1&amp;amp;pageSize=5&amp;amp;since=1970-01-01T00%3A00%3A00Z&lt;/A&gt;' \&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-H 'accept: application/json' \&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-H 'api-key: 226b4150-f29f-4a5a-9438-ab91cc39e080'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H4&gt;&lt;STRONG&gt;Request URL&lt;/STRONG&gt;&lt;/H4&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;A href="https://api.hevyapp.com/v1/workouts/events?page=1&amp;amp;pageSize=5&amp;amp;since=1970-01-01T00%3A00%3A00Z" target="_blank"&gt;https://api.hevyapp.com/v1/workouts/events?page=1&amp;amp;pageSize=5&amp;amp;since=1970-01-01T00%3A00%3A00Z&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Aug 2024 09:27:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4113395#M54910</guid>
      <dc:creator>APIRT</dc:creator>
      <dc:date>2024-08-23T09:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to API via Power Query troubleshot</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4114170#M54920</link>
      <description>&lt;P&gt;up&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 20:26:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4114170#M54920</guid>
      <dc:creator>APIRT</dc:creator>
      <dc:date>2024-08-22T20:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to API via Power Query troubleshot</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4114196#M54921</link>
      <description>&lt;P&gt;Use Anonymous auth.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Json.Document(Web.Contents("https://api.hevyapp.com", [RelativePath="v1/workouts",Query=[page="1",pageSize="5"],Headers=[accept="application/json", #"api-key"="do not share on the interwebs"]])),
    #"Converted to Table" = Table.FromList(Source[workouts], Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "title", "description", "start_time", "end_time", "updated_at", "created_at", "exercises"}),
    #"Expanded exercises" = Table.ExpandListColumn(#"Expanded Column1", "exercises"),
    #"Expanded exercises1" = Table.ExpandRecordColumn(#"Expanded exercises", "exercises", {"index", "title", "notes", "exercise_template_id", "superset_id", "sets"}, {"index", "title.1", "notes", "exercise_template_id", "superset_id", "sets"}),
    #"Expanded sets" = Table.ExpandListColumn(#"Expanded exercises1", "sets"),
    #"Expanded sets1" = Table.ExpandRecordColumn(#"Expanded sets", "sets", {"index", "set_type", "weight_kg", "reps", "distance_meters", "duration_seconds", "rpe"}, {"index.1", "set_type", "weight_kg", "reps", "distance_meters", "duration_seconds", "rpe"})
in
    #"Expanded sets1"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please do not share your API key on the interwebs!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 20:54:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4114196#M54921</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-22T20:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to API via Power Query troubleshot</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4115419#M54937</link>
      <description>&lt;P&gt;Thanks for the response but it's not working. THe data is associated to a user and an account.&lt;/P&gt;&lt;P&gt;That's why the API&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 09:22:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4115419#M54937</guid>
      <dc:creator>APIRT</dc:creator>
      <dc:date>2024-08-23T09:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to API via Power Query troubleshot</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4115442#M54938</link>
      <description>&lt;P&gt;Updated the post with all the information.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 09:29:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4115442#M54938</guid>
      <dc:creator>APIRT</dc:creator>
      <dc:date>2024-08-23T09:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to API via Power Query troubleshot</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4115635#M54941</link>
      <description>&lt;P&gt;It's working for me, I can see the data. What is your error message?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 11:45:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4115635#M54941</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-23T11:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to API via Power Query troubleshot</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4120197#M54994</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/795657"&gt;@APIRT&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Here I agree with&amp;nbsp;&lt;SPAN class=""&gt;lbendlin, I can connect to the REST API with his code. &lt;BR /&gt;According to your request url, you just need to add a since parameter in Query.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Json.Document(Web.Contents("https://api.hevyapp.com", [RelativePath="v1/workouts",Query=[page="1",pageSize="5",since="1970-01-01T00:00:00Z"],Headers=[accept="application/json", #"api-key"="..."]])),
    #"Converted to Table" = Table.FromList(Source[workouts], Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "title", "description", "start_time", "end_time", "updated_at", "created_at", "exercises"}),
    #"Expanded exercises" = Table.ExpandListColumn(#"Expanded Column1", "exercises"),
    #"Expanded exercises1" = Table.ExpandRecordColumn(#"Expanded exercises", "exercises", {"index", "title", "notes", "exercise_template_id", "superset_id", "sets"}, {"index", "title.1", "notes", "exercise_template_id", "superset_id", "sets"}),
    #"Expanded sets" = Table.ExpandListColumn(#"Expanded exercises1", "sets"),
    #"Expanded sets1" = Table.ExpandRecordColumn(#"Expanded sets", "sets", {"index", "set_type", "weight_kg", "reps", "distance_meters", "duration_seconds", "rpe"}, {"index.1", "set_type", "weight_kg", "reps", "distance_meters", "duration_seconds", "rpe"})
in
    #"Expanded sets1"&lt;/LI-CODE&gt;
&lt;P&gt;It works well in my test as well.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vrzhoumsft_0-1724744970341.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1157687iD7BD1FFA56FF0F38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vrzhoumsft_0-1724744970341.png" alt="vrzhoumsft_0-1724744970341.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 07:51:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Connect-to-API-via-Power-Query-troubleshot/m-p/4120197#M54994</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-27T07:51:16Z</dc:date>
    </item>
  </channel>
</rss>

