<?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 Try to use rest API(Export to PDF) with Python in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3346391#M43571</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I am attempting to utilize the "export to PDF" with REST API query in Power BI, but despite using Power BI, I'm encountering difficulties in generating the PDF file.Please provide me solution to reterei data from reports&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jul 2023 11:02:01 GMT</pubDate>
    <dc:creator>lovepreet81988</dc:creator>
    <dc:date>2023-07-24T11:02:01Z</dc:date>
    <item>
      <title>Try to use rest API(Export to PDF) with Python</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3346391#M43571</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am attempting to utilize the "export to PDF" with REST API query in Power BI, but despite using Power BI, I'm encountering difficulties in generating the PDF file.Please provide me solution to reterei data from reports&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 11:02:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3346391#M43571</guid>
      <dc:creator>lovepreet81988</dc:creator>
      <dc:date>2023-07-24T11:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Try to use rest API(Export to PDF) with Python</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3349868#M43610</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/593320"&gt;@lovepreet81988&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can refer the following links to get it:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Using Python:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file" target="_blank"&gt;Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/ExportTo&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://github.com/AntoineDW/powerbi-rest-api-python" target="_blank"&gt;GitHub - AntoineDW/powerbi-rest-api-python: A Python library created to easily use the Power BI REST API with Python&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;pip install pbirest

import pbirest

pbirest.connect(
    client_id = [client_id (required)],
    username = [username (required)],
    password = [password (required)],
    tenant_id = [tenant_id],
    client_secret = [client_secret]
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://github.com/AntoineDW/powerbi-rest-api-python/wiki/Documentation" target="_blank"&gt;Documentation · AntoineDW/powerbi-rest-api-python Wiki · GitHub&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;pbirest.export_report(workspace_id, report_id, out_file)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;Using Postman:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-use-Power-BI-Rest-API-to-export-the-Power-BI-Report-in/ba-p/2179741#:~:text=1%20Step%201%3A%20Execute%20the%20first%20Rest%20API,the%20PDF%20file%20of%20the%20Power%20BI%20Report." target="_blank"&gt;How to use Power BI Rest API to export the Power B... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_0-1690335500883.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/946772iA1D086BAECF6A536/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_0-1690335500883.png" alt="vyiruanmsft_0-1690335500883.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 01:40:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3349868#M43610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-26T01:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Try to use rest API(Export to PDF) with Python</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3350582#M43627</link>
      <description>&lt;P&gt;hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upon attempting to use the POST method with the endpoint URL "&lt;A href="https://api.powerbi.com/v1.0/myorg/reports/%7BreportId%7D/ExportTo" target="_new"&gt;https://api.powerbi.com/v1.0/myorg/reports/{reportId}/ExportTo&lt;/A&gt;," I encountered an error response:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "error": {
    "code": "InvalidRequest",
    "message": "Report requested for export is not on dedicated capacity"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;can u please explain this why i am getting this error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 09:08:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3350582#M43627</guid>
      <dc:creator>lovepreet81988</dc:creator>
      <dc:date>2023-07-26T09:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Try to use rest API(Export to PDF) with Python</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3350612#M43628</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/593320"&gt;@lovepreet81988&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;There are some limitations when using export to file API, it includes that &lt;STRONG&gt;the report you're exporting must reside on a Premium or Embedded capacity&lt;/STRONG&gt;. So please check that your report is in a shared capacity or dedicated capacity...&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/embedded/export-to#considerations-and-limitations" data-linktype="absolute-path" target="_blank"&gt;Export Power BI report to file&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_0-1690363252504.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/946987i639C0993D2E2EE53/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_0-1690363252504.png" alt="vyiruanmsft_0-1690363252504.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 09:22:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3350612#M43628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-26T09:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Try to use rest API(Export to PDF) with Python</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3350670#M43629</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Could you kindly guide me with a step-by-step guide on how to save a report in Embedded capacity?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 09:51:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Try-to-use-rest-API-Export-to-PDF-with-Python/m-p/3350670#M43629</guid>
      <dc:creator>lovepreet81988</dc:creator>
      <dc:date>2023-07-26T09:51:59Z</dc:date>
    </item>
  </channel>
</rss>

