Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jiri4282
New Member

ConnectionString error for Redshift datasource creation via API

Hi all,

 

I'm encountering an error while trying to create datasource for Amazon Redshift via PowerBI REST API. I have succefully created datasources for SQL Server and the error seems to be in not having connection_details in proper format for Redshift.

 

dataSourceType = "Extension"

example connectionDetails used tried: 

"{"server":"{not_relevant}.redshift.amazonaws.com:5439", "database":"{somedb}", "kind":"AmazonRedshift"}"

"{"path":"{not_relevant}.redshift.amazonaws.com:5439;{somedb}", "kind":"AmazonRedshift"}"

 

Error message:

400 Client Error: Bad Request for url: https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId]/datasources. Additional information from API: {'error': {'code': 'DMTS_UnsupportedConnectionStringError', 'pbi.error': {'code': 'DMTS_UnsupportedConnectionStringError', 'parameters': {}, 'details': [], 'exceptionCulprit': 1}}}

 

Thanks you,

 

Best Regards,

Jiri

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @jiri4282 ,

 

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 .

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.

Datasets - Get Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Datasets - Get Gateway Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Lea...

Power Query Amazon Redshift connector - Power Query | Microsoft Learn

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @jiri4282 ,

 

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 .

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.

Datasets - Get Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Datasets - Get Gateway Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Lea...

Power Query Amazon Redshift connector - Power Query | Microsoft Learn

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.