<?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 ConnectionString error for Redshift datasource creation via API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/ConnectionString-error-for-Redshift-datasource-creation-via-API/m-p/4102318#M54779</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm encountering an error while trying to &lt;A title="create datasource" href="https://learn.microsoft.com/en-us/rest/api/power-bi/gateways/create-datasource" target="_self"&gt;create datasource&lt;/A&gt; for Amazon Redshift via PowerBI REST API. I have succefully created datasources for SQL Server and the error seems to be in not having&amp;nbsp;&lt;SPAN&gt;connection_details in proper format for Redshift.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;dataSourceType = "Extension"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;example &lt;SPAN&gt;connectionDetails&lt;/SPAN&gt; used tried:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"{"server":"{not_relevant}.redshift.amazonaws.com:5439", "database":"{somedb}", "kind":"AmazonRedshift"}"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;"{"path":"{not_relevant}.redshift.amazonaws.com:5439;{somedb}"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;, "kind":"AmazonRedshift"}"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Error message:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;400 Client Error: Bad Request for url: &lt;A href="https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId]/datasources" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId]/datasources&lt;/A&gt;. Additional information from API: {'error': {'code': 'DMTS_UnsupportedConnectionStringError', 'pbi.error': {'code': 'DMTS_UnsupportedConnectionStringError', 'parameters': {}, 'details': [], 'exceptionCulprit': 1}}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks you,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2024 12:33:58 GMT</pubDate>
    <dc:creator>jiri4282</dc:creator>
    <dc:date>2024-08-15T12:33:58Z</dc:date>
    <item>
      <title>ConnectionString error for Redshift datasource creation via API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ConnectionString-error-for-Redshift-datasource-creation-via-API/m-p/4102318#M54779</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm encountering an error while trying to &lt;A title="create datasource" href="https://learn.microsoft.com/en-us/rest/api/power-bi/gateways/create-datasource" target="_self"&gt;create datasource&lt;/A&gt; for Amazon Redshift via PowerBI REST API. I have succefully created datasources for SQL Server and the error seems to be in not having&amp;nbsp;&lt;SPAN&gt;connection_details in proper format for Redshift.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;dataSourceType = "Extension"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;example &lt;SPAN&gt;connectionDetails&lt;/SPAN&gt; used tried:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"{"server":"{not_relevant}.redshift.amazonaws.com:5439", "database":"{somedb}", "kind":"AmazonRedshift"}"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;"{"path":"{not_relevant}.redshift.amazonaws.com:5439;{somedb}"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;, "kind":"AmazonRedshift"}"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Error message:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;400 Client Error: Bad Request for url: &lt;A href="https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId]/datasources" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId]/datasources&lt;/A&gt;. Additional information from API: {'error': {'code': 'DMTS_UnsupportedConnectionStringError', 'pbi.error': {'code': 'DMTS_UnsupportedConnectionStringError', 'parameters': {}, 'details': [], 'exceptionCulprit': 1}}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks you,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 12:33:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ConnectionString-error-for-Redshift-datasource-creation-via-API/m-p/4102318#M54779</guid>
      <dc:creator>jiri4282</dc:creator>
      <dc:date>2024-08-15T12:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: ConnectionString error for Redshift datasource creation via API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/ConnectionString-error-for-Redshift-datasource-creation-via-API/m-p/4103910#M54798</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/792132"&gt;@jiri4282&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, the error message 400 code appears to indicate that the content of the request body has a problem, now using the connection string does not match the Power BI design, this can not be used directly with the new one, you must use the matching .&lt;/P&gt;
&lt;P&gt;You can try the following rest api link and resend it inside the Report to get a connection string that matches the format as a template to modify, modify the connection string being used.&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;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-query/connectors/amazon-redshift" target="_blank"&gt;Power Query Amazon Redshift connector - Power Query | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 08:38:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/ConnectionString-error-for-Redshift-datasource-creation-via-API/m-p/4103910#M54798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-16T08:38:22Z</dc:date>
    </item>
  </channel>
</rss>

