Datasets - Set All Dataset Connections

Updates all connections for the specified dataset from "My Workspace".

Note:

  • To update connection details for SQL, AS, OData Feed, and SharePoint, use Update Datasources. For other datasource types, use Update Parameters.
  • This API only supports SQL DirectQuery datasets.


Required scope: Dataset.ReadWrite.All
To set the permissions scope, see Register an app.

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

URI Parameters

Name In Required Type Description
datasetId
path True
  • string

The dataset id

Request Body

Name Required Type Description
connectionString True
  • string

A dataset connection string.

Responses

Name Type Description
200 OK

OK

Examples

example

Sample Request

POST https://api.powerbi.com/v1.0/myorg/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/Default.SetAllConnections
{
  "connectionString": "data source=MyServer.database.windows.net;initial catalog=MyDatabase;persist security info=True;encrypt=True;trustservercertificate=False"
}

Sample Response

Definitions

ConnectionDetails

Connection string wrapper.

Name Type Description
connectionString
  • string

A dataset connection string.