Set All Connections

 

Updated: September 15, 2017



Request | Response

The Set All Connections operation updates all connection strings for each data source in a dataset. The connections strings are updated with the body of the POST call.

Note: This API only supports DirectQuery datasets.

Required scope: Dataset.ReadWrite.All

To set the permissions scope, see Register a client app or Register a web app.

POST https://api.powerbi.com/v1.0/myorg/datasets/{dataset_id}/Default.SetAllConnections

Groups

Groups are a collection of unified Azure Active Directory groups that the user is a member of and is available in the Power BI service. These are referred to as app workspaces within the Power BI service. To learn how to create a group, see Create an app workspace.

POST https://api.powerbi.com/v1.0/myorg/groups/{group_id}/datasets/{dataset_id}/Default.SetAllConnections

Uri parameter

NameDescriptionData Type
group_idGuid of the Group to use. You can get the group id from the Get Groups operation. Groups are referred to as app workspaces within the Power BI service.String
dataset_idGuid of the Dataset to use. You can get the dataset id from the Get Datasets operation.String

Header

Authorization: Bearer eyJ0eX ... FWSXfwtQ

Body schema

{  
    "connectionString": "data source=MyAzureDB.database.windows.net;initial catalog=Sample2;persist security info=True;encrypt=True;trustservercertificate=False"  
}  

Status code

CodeDescription
200OK. Indicates success. The dataset is returned in the response body.

Content-Type

application/json

Show: