Gateways - Get Datasources

Returns a list of datasources from the specified gateway.

Required scope: Dataset.ReadWrite.All or Dataset.Read.All
To set the permissions scope, see Register an app.

GET https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources

URI Parameters

Name In Required Type Description
gatewayId
path True
  • string
uuid

The gateway 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

credentialType

Type of the datasoruce credentials

GatewayDatasource

A Power BI gateway datasource

GatewayDatasources

Odata response wrapper for a Power BI gateway datasource collection

credentialType

Type of the datasoruce credentials

Name Type Description
Anonymous
  • string
Basic
  • string
Key
  • string
OAuth2
  • string
Windows
  • string

GatewayDatasource

A Power BI gateway datasource

Name Type Description
connectionDetails
  • string

Connection details in json format

credentialType

Type of the datasoruce credentials

datasourceName
  • string

The name of the datasource

datasourceType
  • string

The type of the datasource

gatewayId
  • string

The associated gateway id

id
  • string

The unique id for this datasource

GatewayDatasources

Odata response wrapper for a Power BI gateway datasource collection

Name Type Description
odata.context
  • string

OData context

value

List of gateway datasources