<?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: Unable to change parameter using Rest API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-change-parameter-using-Rest-API/m-p/533112#M16359</link>
    <description>&lt;P&gt;It seems quite a trivial problem but I am unable to figure out the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help as it is quite important for my client.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Oct 2018 02:58:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-04T02:58:23Z</dc:date>
    <item>
      <title>Unable to change parameter using Rest API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-change-parameter-using-Rest-API/m-p/523861#M16164</link>
      <description>&lt;P&gt;Hi, I am facing an issue while trying to change Report parameter values on power bi service using api&amp;nbsp;request call using the syntax provided in the power bi documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The query that I am sending using python is as below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;dest = '&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/&lt;/A&gt;' + self.group_id + '/datasets/' + self.dataset_id + '/Default.UpdateParameters'&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;headers = {'Authorization': 'Bearer ' + self.access_token}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;data = {"updateDetails": [{"name": "ScenarioID","newValue": "110"},{"name":"ChildID","newValue":"13"}]}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Param = requests.post(dest, data=data, headers=headers)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which is giving me below response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{'error': {'code': 'InvalidRequest',&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'message': 'Dataset Parameters list is invalid in &lt;FONT color="#993300"&gt;DatasetID&lt;/FONT&gt;. Reason: Invalid parameter update details',&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'target': '&lt;FONT color="#993300"&gt;DatasetID&lt;/FONT&gt;'}}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I am unable to understand how to resolve this I have parameters defined as&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="C:\Users\Shobhit.Gupta\Desktop\Parameter.png" border="0" alt="" /&gt;Required box ticked.&lt;/P&gt;&lt;P&gt;Type Decimal Number (I have tried it with text type as well)&lt;/P&gt;&lt;P&gt;suggested values: any&lt;/P&gt;&lt;P&gt;Current Value 108&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 09:30:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-change-parameter-using-Rest-API/m-p/523861#M16164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-24T09:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to change parameter using Rest API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-change-parameter-using-Rest-API/m-p/533112#M16359</link>
      <description>&lt;P&gt;It seems quite a trivial problem but I am unable to figure out the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help as it is quite important for my client.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 02:58:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-change-parameter-using-Rest-API/m-p/533112#M16359</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-04T02:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to change parameter using Rest API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-change-parameter-using-Rest-API/m-p/533331#M16363</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6970"&gt;@v-qiuyu-msft&lt;/a&gt;&amp;nbsp; any suggestions&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 07:40:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-change-parameter-using-Rest-API/m-p/533331#M16363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-04T07:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to change parameter using Rest API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-change-parameter-using-Rest-API/m-p/1899844#M29978</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;dest = '&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.powerbi.com/v1.0/myorg/groups/&lt;/A&gt;' + self.group_id + '/datasets/' + self.dataset_id + '/Default.UpdateParameters'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;body= {&lt;BR /&gt;"updateDetails": [&lt;BR /&gt;{&lt;BR /&gt;"name": "DataBase",&lt;BR /&gt;"newValue": "myDB"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Server",&lt;BR /&gt;"newValue": "123.456.789"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;header = {'Content-Type': 'application/json'&lt;BR /&gt;,'Authorization': f'Bearer {tokenPBI}', 'Accept': 'text/plain'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;requests.post(&lt;EM&gt;dest&lt;/EM&gt;,&lt;BR /&gt;data=json.dumps(body),&lt;BR /&gt;headers=header&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 22:45:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-change-parameter-using-Rest-API/m-p/1899844#M29978</guid>
      <dc:creator>aramirez7</dc:creator>
      <dc:date>2021-06-14T22:45:25Z</dc:date>
    </item>
  </channel>
</rss>

