<?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: REST API - Executequeries function in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Executequeries-function/m-p/2716855#M38069</link>
    <description>&lt;P&gt;Hi Abhinary_Roze. Yes the doc specify a body for the post. You can build a dict at python and then convert it as the parameter of the request. Check this example using requests and json libraries:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import requests
import json
url= "https://api.powerbi.com/v1.0/myorg/groups/{}/datasets/{}/executeQueries".format(workspace_id, dataset_id)
body = {
    "queries": [{"query": query}], 
    "serializerSettings": {"includeNulls": "true"}
}
res = requests.post(url, data = json.dumps(body), headers = headers) &lt;/LI-CODE&gt;
&lt;P&gt;The requests.post will receive the url, body and headers (here you must write the bearer). You can convert your python dictionary (body variable) with json.dumps.&lt;/P&gt;
&lt;P&gt;If you feel this all is too much you can use a Power Bi Rest API python library like SimplePBI. In there you can just import library, create token, create dataset class and make the request.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://pypi.org/project/SimplePBI/" target="_blank"&gt;https://pypi.org/project/SimplePBI/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I hope that helps,&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2022 11:51:40 GMT</pubDate>
    <dc:creator>ibarrau</dc:creator>
    <dc:date>2022-08-22T11:51:40Z</dc:date>
    <item>
      <title>REST API - Executequeries function</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Executequeries-function/m-p/2713787#M38013</link>
      <description>&lt;DIV class=""&gt;REST API - Executequeries function&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&lt;BR /&gt;Hi All,&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Abhinay_Rozer_0-1660977206692.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/768817iD8AC55675345948F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Abhinay_Rozer_0-1660977206692.png" alt="Abhinay_Rozer_0-1660977206692.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to execute the "ExecuteQueries" REST API method on a dataset using Python programming, but I am not sure where i need to write body.&lt;BR /&gt;I gone through the microsoft documentation for&amp;nbsp;ExecuteQueries REST API method&lt;BR /&gt;there it's mentioned to provide body in json format to get desired results&lt;BR /&gt;but i don't have any clue how i can pass this body to the executequeries API&lt;BR /&gt;&lt;BR /&gt;Can you plese help on this if possible&amp;nbsp;&lt;BR /&gt;thanks in advance&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 20 Aug 2022 06:34:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Executequeries-function/m-p/2713787#M38013</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-20T06:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Executequeries function</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Executequeries-function/m-p/2713788#M38014</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/11211"&gt;@ibarrau&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Aug 2022 06:35:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Executequeries-function/m-p/2713788#M38014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-20T06:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: REST API - Executequeries function</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Executequeries-function/m-p/2716855#M38069</link>
      <description>&lt;P&gt;Hi Abhinary_Roze. Yes the doc specify a body for the post. You can build a dict at python and then convert it as the parameter of the request. Check this example using requests and json libraries:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import requests
import json
url= "https://api.powerbi.com/v1.0/myorg/groups/{}/datasets/{}/executeQueries".format(workspace_id, dataset_id)
body = {
    "queries": [{"query": query}], 
    "serializerSettings": {"includeNulls": "true"}
}
res = requests.post(url, data = json.dumps(body), headers = headers) &lt;/LI-CODE&gt;
&lt;P&gt;The requests.post will receive the url, body and headers (here you must write the bearer). You can convert your python dictionary (body variable) with json.dumps.&lt;/P&gt;
&lt;P&gt;If you feel this all is too much you can use a Power Bi Rest API python library like SimplePBI. In there you can just import library, create token, create dataset class and make the request.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://pypi.org/project/SimplePBI/" target="_blank"&gt;https://pypi.org/project/SimplePBI/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I hope that helps,&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 11:51:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Executequeries-function/m-p/2716855#M38069</guid>
      <dc:creator>ibarrau</dc:creator>
      <dc:date>2022-08-22T11:51:40Z</dc:date>
    </item>
  </channel>
</rss>

