Get Datasources

 

Updated: January 23, 2017



Request | Response

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

NameDescription
collectionNameThe workspace collection name
workspaceIdThe workspace id
datasetKeyThe dataset key

Status code

CodeDescription
200OK. 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: