Datasets - Set All Dataset Connections
Updates all connections for the specified dataset from My workspace. This API call only supports SQL DirectQuery datasets.
Important
This API call is deprecated and no longer supported. This API call isn't compatible with enhanced dataset metadata.
Instead use:
- Update Parameters to update connections for SQL, Azure Synapse, OData, and SharePoint data sources.
- Update Datasources to connections for other data sources.
Required Scope
Dataset.ReadWrite.All
POST https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/Default.SetAllConnections
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
dataset
|
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
A connection string wrapper
Name | Type | Description |
---|---|---|
connectionString |
string |
A dataset connection string |