cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Error calling api.powerbi.com/v1.0/myorg/myorg/datasets/{dataset_id}/Default.SetAllConnections

Hi all,

 

The REST API has a method to set the connection string on a datasource...

 

https://msdn.microsoft.com/en-us/library/mt748181.aspx

 

However, it always returns an error.  I've tried calling it every way I can think of.  Still get the same '400 Bad Request' error.

 

Has anybody actually called this method successfully?  I posted a similar question here without a response...

http://community.powerbi.com/t5/Service/Can-the-Rest-API-change-the-connection-string-username-passw...

 

There is a beer in Sydney for anyone that can help - I'm pulling my hair out.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Error calling api.powerbi.com/v1.0/myorg/myorg/datasets/{dataset_id}/Default.SetAllConnections

Finally worked it out - it's not possible.

 

For some reason, the Rest API is documented twice.  Once on msdn and once here...

http://docs.powerbi.apiary.io/#reference/datasets/update-all-connection-strings/update-all-connectio...

 

And you can see on the apiary page that SetAllConnections only works on direct query connections.

View solution in original post

3 REPLIES 3
Moderator Eric_Zhang
Moderator

Re: Error calling api.powerbi.com/v1.0/myorg/myorg/datasets/{dataset_id}/Default.SetAllConnections

@Anonymous

 

I'm not aware of any capability of the Power BI REST API to set the connection string, though the online documentation lists the SetAllConnections API. As of now, even in the Power BI service UI, you can't change the connection string. Check Ability to change the data source connection string from PBI service. So I doubt it might be a feature in future.

I would consult this internally and post back if there comes any update.

By the way, the SetAllConnection API for Power BI Embedded actually works.

Anonymous
Not applicable

Re: Error calling api.powerbi.com/v1.0/myorg/myorg/datasets/{dataset_id}/Default.SetAllConnections

Thanks Eric.  Please let me know what you find out.  If I can't use the documented API then my project is pretty screwed.  

Anonymous
Not applicable

Re: Error calling api.powerbi.com/v1.0/myorg/myorg/datasets/{dataset_id}/Default.SetAllConnections

Finally worked it out - it's not possible.

 

For some reason, the Rest API is documented twice.  Once on msdn and once here...

http://docs.powerbi.apiary.io/#reference/datasets/update-all-connection-strings/update-all-connectio...

 

And you can see on the apiary page that SetAllConnections only works on direct query connections.

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 337 members 3,347 guests
Please welcome our newest community members: