Admin - Dataflows GetDataflowDatasourcesAsAdmin
Returns a list of datasources for the specified dataflow.
Note: The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
Required scope: Tenant.Read.All
Application only and delegated permissions are supported.
To set the permissions scope, see Register an app.
GET https://api.powerbi.com/v1.0/myorg/admin/dataflows/{dataflowId}/datasources
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
dataflow
|
path | True |
|
The dataflow id |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
Examples
Example
Sample Request
GET https://api.powerbi.com/v1.0/myorg/admin/dataflows/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources
Sample Response
{
"value": [
{
"name": "301",
"connectionString": "data source=MyServer.database.windows.net;initial catalog=MyDatabase;persist security info=True;encrypt=True;trustservercertificate=False",
"datasourceType": "Sql",
"datasourceId": "16a54ccd-620d-4af3-9197-0b8c779a9a6d",
"gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674",
"connectionDetails": {
"server": "MyServer.database.windows.net",
"database": "MyDatabase"
}
}
]
}
Definitions
Datasource |
A Power BI datasource |
Datasource |
A Power BI datasource connection details |
Datasources |
Odata response wrapper for a Power BI datasource collection |
Datasource
A Power BI datasource
Name | Type | Description |
---|---|---|
connectionDetails |
The datasource connection details |
|
connectionString |
|
(Deprecated) The datasource connection string. Available only for DirectQuery. |
datasourceId |
|
The bound datasource id. Empty when not bound to a gateway. |
datasourceType |
|
The datasource type |
gatewayId |
|
The bound gateway id. Empty when not bound to a gateway. |
name |
|
(Deprecated) The datasource name. Available only for DirectQuery. |
DatasourceConnectionDetails
A Power BI datasource connection details
Name | Type | Description |
---|---|---|
database |
|
The connection database. |
server |
|
The connection server. |
url |
|
The connection url |
Datasources
Odata response wrapper for a Power BI datasource collection
Name | Type | Description |
---|---|---|
odata.context |
|
OData context |
value |
The datasource collection |