Gateways - Get Datasources
Returns a list of data sources from the specified gateway.
Permissions
The user must have gateway admin permissions.
Required Scope
Dataset.ReadWrite.All or Dataset.Read.All
Limitations
Virtual network (VNet) gateways aren't supported.
GET https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
gateway
|
path | True |
string uuid |
The gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster. In such cases, gateway ID is similar to gateway cluster ID. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
Examples
Example
Sample request
GET https://api.powerbi.com/v1.0/myorg/gateways/1f69e798-5852-4fdd-ab01-33bb14b6e934/datasources
Sample response
{
"value": [
{
"id": "252b9de8-d915-4788-aaeb-ec8c2395f970",
"gatewayId": "1f69e798-5852-4fdd-ab01-33bb14b6e934",
"datasourceType": "Sql",
"connectionDetails": "{\"server\":\"localSQL\",\"database\":\"salesDB\"}",
"credentialType": "Windows",
"datasourceName": "SQL Datasource"
},
{
"id": "91f8aec2-4b32-476f-909b-3241999620ec",
"gatewayId": "1f69e798-5852-4fdd-ab01-33bb14b6e934",
"datasourceType": "AnalysisServices",
"connectionDetails": "{\"server\":\"localAS\",\"database\":\"marketingDB\"}",
"credentialType": "Windows",
"datasourceName": "AS Datasource"
}
]
}
Definitions
Name | Description |
---|---|
credential |
The type of data source credential |
Gateway |
A Power BI gateway data source |
Gateway |
The data source credential details |
Gateway |
The OData response wrapper for a Power BI gateway data source collection |
credentialType
The type of data source credential
Name | Type | Description |
---|---|---|
Anonymous |
string |
|
Basic |
string |
|
Key |
string |
|
OAuth2 |
string |
|
SAS |
string |
|
Windows |
string |
GatewayDatasource
A Power BI gateway data source
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
connectionDetails |
string |
Connection details in JSON format |
|||||||||||||||||||||||||||||||||||||||||||||||||||
credentialDetails |
The connection details for the data source that needs update. The connection details are mandatory when the dataset has more than one data source. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
credentialType |
The type of data source credential |
||||||||||||||||||||||||||||||||||||||||||||||||||||
datasourceName |
string |
The name of the data source |
|||||||||||||||||||||||||||||||||||||||||||||||||||
datasourceType |
string |
The type of data source.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
gatewayId |
string |
The associated gateway ID. When using a gateway cluster, the gateway ID refers to the primary (first) gateway in the cluster and is similar to the gateway cluster ID. |
|||||||||||||||||||||||||||||||||||||||||||||||||||
id |
string |
The unique ID for the data source |
GatewayDatasourceCredentialDetails
The data source credential details
Name | Type | Description |
---|---|---|
useEndUserOAuth2Credentials |
boolean |
Whether the end-user Azure AD identity (OAuth 2.0 credentials) is used when connecting to the data source in DirectQuery mode. Use with data sources that support single sign-on (SSO). |
GatewayDatasources
The OData response wrapper for a Power BI gateway data source collection
Name | Type | Description |
---|---|---|
odata.context |
string |
OData context |
value |
The list of gateway data sources |