<?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: Power-BI REST API use Azure SQL Server as datasource in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-use-Azure-SQL-Server-as-datasource/m-p/4026643#M53951</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for something that need no changes on pbix files.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I just want to connect the report on powerbi service, dinamically whit new Azure SQL server whitout using the On-Premis Data gateway&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2024 08:27:57 GMT</pubDate>
    <dc:creator>mforte</dc:creator>
    <dc:date>2024-07-05T08:27:57Z</dc:date>
    <item>
      <title>Power-BI REST API use Azure SQL Server as datasource</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-use-Azure-SQL-Server-as-datasource/m-p/4025427#M53927</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I use Power BI Embedded to provide services to customers. Currently, we use a SQL Server on our VPS.&lt;/P&gt;&lt;P&gt;Each customer has a database, and each customer has an associated PBIX file that was associated to the correct DB throw the on-premises data gateway software.&lt;/P&gt;&lt;P&gt;Currently, the process to associate a PBIX file to the database is as follows:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Upload PBIX file via API: &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/%7btargetWKS%7d/imports?datasetDisplayName=%7bnewPBIXName%7d&amp;amp;nameConflict=CreateOrOverwrite" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{targetWKS}/imports?datasetDisplayName={newPBIXName}&amp;amp;nameConflict=CreateOrOverwrite&lt;/A&gt;.replace("{targetWKS}", targetWKS).replace("{newPBIXName}", newPBIXName)&lt;/LI&gt;&lt;LI&gt;Update datasource via API: &lt;A href="https://api.powerbi.com/v1.0/myorg/datasets/%7bdatasetId%7d/Default.UpdateDatasources" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/Default.UpdateDatasources&lt;/A&gt;.replace("{datasetId}", datasetId);&lt;/LI&gt;&lt;LI&gt;Create datasource in my gateway via API: &lt;A href="https://api.powerbi.com/v1.0/myorg/gateways/%7bgatewayId%7d/datasources" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources&lt;/A&gt;.replace("{gatewayId}", gatewayId);&lt;/LI&gt;&lt;LI&gt;Bind datasource to gateway via API: &lt;A href="https://api.powerbi.com/v1.0/myorg/datasets/%7bdatasetId%7d/Default.BindToGateway" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/Default.BindToGateway&lt;/A&gt;.replace("{datasetId}", datasetPBId);&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;After completing this procedure, the pbix dataset was refreshed correctly .&lt;/P&gt;&lt;P&gt;We are considering switching to an Azure Sql Server Managed Instance.&lt;/P&gt;&lt;P&gt;So, I am testing the integration without using the On-Premises data gateway software.&lt;/P&gt;&lt;P&gt;Through the web interface (Power BI services), it is possible to create a cloud connection (see the screenshot "CloudConnection.PNG").&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CloudConnection.PNG" style="width: 141px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1126933i871C7475B8715D1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CloudConnection.PNG" alt="CloudConnection.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;How can I create the same type of connection via API?&lt;/P&gt;&lt;P&gt;I have checked the outgoing web requests when creating the CloudConnection, and the interface calls this API: &lt;A href="https://api.powerbi.com/v2.0/myorg/me/gatewayClusterCloudDatasource" target="_blank"&gt;https://api.powerbi.com/v2.0/myorg/me/gatewayClusterCloudDatasource&lt;/A&gt;, but I cannot find it among the available APIs on &lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/" target="_blank"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/&lt;/A&gt; .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all for your support.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 15:36:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-use-Azure-SQL-Server-as-datasource/m-p/4025427#M53927</guid>
      <dc:creator>mforte</dc:creator>
      <dc:date>2024-07-04T15:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Power-BI REST API use Azure SQL Server as datasource</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-use-Azure-SQL-Server-as-datasource/m-p/4025909#M53941</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/258010"&gt;@mforte&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you do not clear how to create similar connection based on REST API, you can build a template version on power bi side at first.&lt;BR /&gt;Then you can use REST API to get this connection string and use this template as refence to modify to the fact versions.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasources-in-group" target="_blank"&gt;Datasets - Get Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-gateway-datasources-in-group" target="_blank"&gt;Datasets - Get Gateway Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 01:33:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-use-Azure-SQL-Server-as-datasource/m-p/4025909#M53941</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-05T01:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Power-BI REST API use Azure SQL Server as datasource</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-use-Azure-SQL-Server-as-datasource/m-p/4026643#M53951</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for something that need no changes on pbix files.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I just want to connect the report on powerbi service, dinamically whit new Azure SQL server whitout using the On-Premis Data gateway&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 08:27:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-REST-API-use-Azure-SQL-Server-as-datasource/m-p/4026643#M53951</guid>
      <dc:creator>mforte</dc:creator>
      <dc:date>2024-07-05T08:27:57Z</dc:date>
    </item>
  </channel>
</rss>

