Datasets - Bind To Gateway

Binds the specified dataset from My workspace to the specified gateway, optionally with a given set of data source IDs. If you don't supply a specific data source ID, the dataset will be bound to the first matching data source in the gateway.

Important

Add the API caller principal as a data source user on the gateway.

Required Scope

Dataset.ReadWrite.All

Limitations

Only supports the on-premises data gateway

POST https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/Default.BindToGateway

URI Parameters

Name In Required Type Description
datasetId
path True

string

The dataset ID

Request Body

Name Required Type Description
gatewayObjectId True

string

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

datasourceObjectIds

string[]

The unique identifiers for the data sources in the gateway

Responses

Name Type Description
200 OK

OK

Examples

Example with 'datasourceObjectIds'
Example without 'datasourceObjectIds'

Example with 'datasourceObjectIds'

Sample request

POST https://api.powerbi.com/v1.0/myorg/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/Default.BindToGateway
{
  "gatewayObjectId": "1f69e798-5852-4fdd-ab01-33bb14b6e934",
  "datasourceObjectIds": [
    "dc2f2dac-e5e2-4c37-af76-2a0bc10f16cb",
    "3bfe5d33-ab7d-4d24-b0b5-e2bb8eb01cf5"
  ]
}

Sample response

Example without 'datasourceObjectIds'

Sample request

POST https://api.powerbi.com/v1.0/myorg/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/Default.BindToGateway
{
  "gatewayObjectId": "1f69e798-5852-4fdd-ab01-33bb14b6e934"
}

Sample response

Definitions

BindToGatewayRequest

The bind dataset to gateway request

Name Type Description
datasourceObjectIds

string[]

The unique identifiers for the data sources in the gateway

gatewayObjectId

string

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