<?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 GOALS Rest API - Expanding on Values &amp;amp; Notes via PowerShell in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/GOALS-Rest-API-Expanding-on-Values-amp-Notes-via-PowerShell/m-p/2527331#M36210</link>
    <description>&lt;P&gt;Hey Community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope everybody is doing well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to develop a PowerShell script to colect not only Goals but its values and notes in one single line of code (without the need to loop over the Goals collection).&lt;/P&gt;&lt;P&gt;Following the documention, it seems that we have the possibility to "expand" the notes when we're selecting the GoalsValues:&lt;/P&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="JOAOLBMARTINS_0-1652981816781.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/718395iF5FC79C7D6E0B1E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JOAOLBMARTINS_0-1652981816781.png" alt="JOAOLBMARTINS_0-1652981816781.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've already tried this one and it works only for expanding the goals values:&lt;/P&gt;&lt;P&gt;myURL =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"&lt;A href="https://api.powerbi.com/v1.0/myOrg/groups/$workspaceId/scorecards($scorecardId" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myOrg/groups/$workspaceId/scorecards($scorecardId&lt;/A&gt;)?`$expand=goals(`$expand=goalValues)"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm trying the two scenarios below:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;First one that is not working is to fetch goals values and notes at once using the following URL:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$myURL&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://api.powerbi.com/v1.0/myOrg/groups/" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myOrg/groups/&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;$workspaceId&lt;/SPAN&gt;&lt;SPAN&gt;/scorecards(&lt;/SPAN&gt;&lt;SPAN&gt;$scorecardId&lt;/SPAN&gt;&lt;SPAN&gt;)?&lt;/SPAN&gt;&lt;SPAN&gt;`$&lt;/SPAN&gt;&lt;SPAN&gt;expand=goals(&lt;/SPAN&gt;&lt;SPAN&gt;`$&lt;/SPAN&gt;&lt;SPAN&gt;expand=goalValues(&lt;/SPAN&gt;&lt;SPAN&gt;`$&lt;/SPAN&gt;&lt;SPAN&gt;expand=notes))"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The second option, is to expand over goalValues only:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$myURL="&lt;A href="https://api.powerbi.com/v1.0/myOrg/groups/$workspaceId/scorecards($scorecardId" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myOrg/groups/$workspaceId/scorecards($scorecardId&lt;/A&gt;)?`$expand=goalValues(`$expand=notes)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This one works, but the "notes" field returns empty/blank (or maybe I'm not knowing how to access it).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;My last option and the only that works is the following:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$myURL&lt;/SPAN&gt;&lt;SPAN&gt;="&lt;A href="https://api.powerbi.com/" target="_blank" rel="noopener"&gt;https://api.powerbi.com/&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;v1.0/myOrg/groups/&lt;/SPAN&gt;&lt;SPAN&gt;$workspaceId&lt;/SPAN&gt;&lt;SPAN&gt;/scorecards(&lt;/SPAN&gt;&lt;SPAN&gt;$scorecardId&lt;/SPAN&gt;&lt;SPAN&gt;)/goals(&lt;/SPAN&gt;&lt;SPAN&gt;$goalId&lt;/SPAN&gt;&lt;SPAN&gt;)/goalValues(2022-05-14T00:00:00Z)?&lt;/SPAN&gt;&lt;SPAN&gt;`$&lt;/SPAN&gt;&lt;SPAN&gt;expand=notes"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, to be able to get the note, I not only need to pass a GoalID but also the timestamp I want to retrieve the note.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Does anyone already played with the REST API for Goals and can give a way to access all the goals, values and notes at once?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;João Martins&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 18:04:32 GMT</pubDate>
    <dc:creator>JOAOLBMARTINS</dc:creator>
    <dc:date>2022-05-19T18:04:32Z</dc:date>
    <item>
      <title>GOALS Rest API - Expanding on Values &amp; Notes via PowerShell</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/GOALS-Rest-API-Expanding-on-Values-amp-Notes-via-PowerShell/m-p/2527331#M36210</link>
      <description>&lt;P&gt;Hey Community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope everybody is doing well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to develop a PowerShell script to colect not only Goals but its values and notes in one single line of code (without the need to loop over the Goals collection).&lt;/P&gt;&lt;P&gt;Following the documention, it seems that we have the possibility to "expand" the notes when we're selecting the GoalsValues:&lt;/P&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="JOAOLBMARTINS_0-1652981816781.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/718395iF5FC79C7D6E0B1E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JOAOLBMARTINS_0-1652981816781.png" alt="JOAOLBMARTINS_0-1652981816781.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've already tried this one and it works only for expanding the goals values:&lt;/P&gt;&lt;P&gt;myURL =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"&lt;A href="https://api.powerbi.com/v1.0/myOrg/groups/$workspaceId/scorecards($scorecardId" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myOrg/groups/$workspaceId/scorecards($scorecardId&lt;/A&gt;)?`$expand=goals(`$expand=goalValues)"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm trying the two scenarios below:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;First one that is not working is to fetch goals values and notes at once using the following URL:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$myURL&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://api.powerbi.com/v1.0/myOrg/groups/" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myOrg/groups/&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;$workspaceId&lt;/SPAN&gt;&lt;SPAN&gt;/scorecards(&lt;/SPAN&gt;&lt;SPAN&gt;$scorecardId&lt;/SPAN&gt;&lt;SPAN&gt;)?&lt;/SPAN&gt;&lt;SPAN&gt;`$&lt;/SPAN&gt;&lt;SPAN&gt;expand=goals(&lt;/SPAN&gt;&lt;SPAN&gt;`$&lt;/SPAN&gt;&lt;SPAN&gt;expand=goalValues(&lt;/SPAN&gt;&lt;SPAN&gt;`$&lt;/SPAN&gt;&lt;SPAN&gt;expand=notes))"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The second option, is to expand over goalValues only:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$myURL="&lt;A href="https://api.powerbi.com/v1.0/myOrg/groups/$workspaceId/scorecards($scorecardId" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myOrg/groups/$workspaceId/scorecards($scorecardId&lt;/A&gt;)?`$expand=goalValues(`$expand=notes)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This one works, but the "notes" field returns empty/blank (or maybe I'm not knowing how to access it).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;My last option and the only that works is the following:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$myURL&lt;/SPAN&gt;&lt;SPAN&gt;="&lt;A href="https://api.powerbi.com/" target="_blank" rel="noopener"&gt;https://api.powerbi.com/&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;v1.0/myOrg/groups/&lt;/SPAN&gt;&lt;SPAN&gt;$workspaceId&lt;/SPAN&gt;&lt;SPAN&gt;/scorecards(&lt;/SPAN&gt;&lt;SPAN&gt;$scorecardId&lt;/SPAN&gt;&lt;SPAN&gt;)/goals(&lt;/SPAN&gt;&lt;SPAN&gt;$goalId&lt;/SPAN&gt;&lt;SPAN&gt;)/goalValues(2022-05-14T00:00:00Z)?&lt;/SPAN&gt;&lt;SPAN&gt;`$&lt;/SPAN&gt;&lt;SPAN&gt;expand=notes"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, to be able to get the note, I not only need to pass a GoalID but also the timestamp I want to retrieve the note.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Does anyone already played with the REST API for Goals and can give a way to access all the goals, values and notes at once?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;João Martins&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 18:04:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/GOALS-Rest-API-Expanding-on-Values-amp-Notes-via-PowerShell/m-p/2527331#M36210</guid>
      <dc:creator>JOAOLBMARTINS</dc:creator>
      <dc:date>2022-05-19T18:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: GOALS Rest API - Expanding on Values &amp; Notes via PowerShell</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/GOALS-Rest-API-Expanding-on-Values-amp-Notes-via-PowerShell/m-p/2532636#M36254</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/226396"&gt;@JOAOLBMARTINS&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;I check the document but did not find any existed API that allows for bulk operation with multiple goals. &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;So I think you need to write a loop to invoke the single request multiple times with different parameters.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 08:52:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/GOALS-Rest-API-Expanding-on-Values-amp-Notes-via-PowerShell/m-p/2532636#M36254</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-23T08:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: GOALS Rest API - Expanding on Values &amp; Notes via PowerShell</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/GOALS-Rest-API-Expanding-on-Values-amp-Notes-via-PowerShell/m-p/2539192#M36331</link>
      <description>&lt;P&gt;Ohh that's a shame. I really didn't want to loop over all the notes in all the goals to copy from one to another scorecard&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 14:12:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/GOALS-Rest-API-Expanding-on-Values-amp-Notes-via-PowerShell/m-p/2539192#M36331</guid>
      <dc:creator>JOAOLBMARTINS</dc:creator>
      <dc:date>2022-05-25T14:12:16Z</dc:date>
    </item>
  </channel>
</rss>

