Get Datasources
Updated: January 23, 2017
The Get Datasources operation returns a JSON object which represents list of Datasource objects.
Note To call this operation, an app token or key is required. To learn more, see Authenticating and authorizing with Power BI Embedded.
GET https://api.powerbi.com/v1.0/collections/{collectionName}/workspaces/{workspaceId}/datasets/{datasetKey}/datasources
Uri parameter
| Name | Description |
|---|---|
| collectionName | The workspace collection name |
| workspaceId | The workspace id |
| datasetKey | The dataset key |
Status code
| Code | Description |
|---|---|
| 200 | OK. Indicates success. An JSON object which represents list of Datasource objects.. |
Content-Type
application/json
Body schema
{
"@odata.context":"https://api.powerbi.com/v1.0/collections/{WorkspaceName}/workspaces/{WorkspaceId}/datasets/{datasetKey}/$metadata#datasources",
"value": [
{
"name": string,
"connectionString": string
}
]
}
Body example
{
"@odata.context": "https://api.powerbi.com/v1.0/collections/{WorkspaceName}/workspaces/{WorkspaceId}/datasets/{datasetKey}/$metadata#datasources",
"value": [
{
"name": "DataSource1",
"connectionString": "data source=MyAzureDB.database.windows.net;initial catalog=Sample2;persist security info=True;encrypt=True;trustservercertificate=False"
}
]
}
Show: