Datasets - Bind To Gateway

将指定的数据集从 我的工作区 绑定到指定的网关,可以选择使用给定的数据源 ID 集。 如果未提供特定的数据源 ID,数据集将绑定到网关中的第一个匹配数据源。

重要

将 API 调用方主体添加为网关上的数据源用户。

所需范围

Dataset.ReadWrite.All

局限性

仅支持本地数据网关

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

URI 参数

名称 必需 类型 说明
datasetId
path True

string

数据集 ID

请求正文

名称 必需 类型 说明
gatewayObjectId True

string (uuid)

网关 ID。 使用网关群集时,网关 ID 引用群集中的主网关(第一个)网关,类似于网关群集 ID。

datasourceObjectIds

string[] (uuid)

网关中数据源的唯一标识符

响应

名称 类型 说明
200 OK

还行

示例

Example with 'datasourceObjectIds'
Example without 'datasourceObjectIds'

Example with 'datasourceObjectIds'

示例请求

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"
  ]
}

示例响应

Example without 'datasourceObjectIds'

示例请求

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

示例响应

定义

BindToGatewayRequest

将数据集绑定到网关请求

名称 类型 说明
datasourceObjectIds

string[] (uuid)

网关中数据源的唯一标识符

gatewayObjectId

string (uuid)

网关 ID。 使用网关群集时,网关 ID 引用群集中的主网关(第一个)网关,类似于网关群集 ID。