Datasets - Get Datasources In Group

返回指定工作区中指定数据集的数据源列表。

权限

此 API 调用可由服务主体配置文件调用。 有关详细信息,请参阅:Power BI Embedded中的服务主体配置文件

所需范围

Dataset.ReadWrite.All 或 Dataset.Read.All

GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/datasources

URI 参数

名称 必需 类型 说明
datasetId
path True

string

groupId
path True

string

uuid

工作区 ID

响应

名称 类型 说明
200 OK

Datasources

确定

示例

Analysis Services example
Azure Blobs datasource example
Excel example
Extension datasource example
Microsoft Exchange datasource example
OData example
Oracle example
Salesforce datasource example
SAP HANA example
SharePoint example
SQL example

Analysis Services example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "AnalysisServices",
      "connectionDetails": {
        "server": "My-As-Server",
        "database": "My-As-Database"
      },
      "datasourceId": "33cc5222-3fb9-44f7-b19d-ffbff18aaaf5",
      "gatewayId": "0a2dafe6-0e93-4120-8d2c-fae123c111b1"
    }
  ]
}

Azure Blobs datasource example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "AzureBlobs",
      "datasourceId": "e0315274-90b6-4fc0-abf2-2d60d448cb04",
      "gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674",
      "connectionDetails": {
        "account": "myAccount",
        "domain": "blob.core.windows.net"
      }
    }
  ]
}

Excel example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "File",
      "connectionDetails": {
        "path": "c:\\users\\username\\documents\\orders1.xlsx"
      },
      "datasourceId": "33cc5222-3fb9-44f7-b19d-ffbff18aaaf5",
      "gatewayId": "0a2dafe6-0e93-4120-8d2c-fae123c111b1"
    }
  ]
}

Extension datasource example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "Extension",
      "datasourceId": "70540d95-4c8e-41ae-88c6-27a103b12841",
      "gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674",
      "connectionDetails": {
        "kind": "AzureDataExplorer",
        "path": "https://myserver.kusto.windows.net"
      }
    }
  ]
}

Microsoft Exchange datasource example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "Exchange",
      "datasourceId": "4d126fc8-1568-46aa-ba16-ccf19b18f012",
      "gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674",
      "connectionDetails": {
        "emailAddress": "john@contoso.com"
      }
    }
  ]
}

OData example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "OData",
      "connectionDetails": {
        "url": "http://services.odata.org/MyOdata/MyOdata.svc"
      },
      "datasourceId": "33cc5222-3fb9-44f7-b19d-ffbff18aaaf5",
      "gatewayId": "0a2dafe6-0e93-4120-8d2c-fae123c111b1"
    }
  ]
}

Oracle example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "Oracle",
      "connectionDetails": {
        "server": "My-Oracle-Server",
        "database": "My-Oracle-Database"
      },
      "datasourceId": "33cc5222-3fb9-44f7-b19d-ffbff18aaaf5",
      "gatewayId": "0a2dafe6-0e93-4120-8d2c-fae123c111b1"
    }
  ]
}

Salesforce datasource example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "Salesforce",
      "datasourceId": "e8a6e0f5-b244-402a-ba5a-4d578609ede3",
      "gatewayId": "7f1c4e55-544b-403f-b132-da0d3a024674",
      "connectionDetails": {
        "classInfo": "report-detail",
        "loginServer": "https://login.salesforce.com/"
      }
    }
  ]
}

SAP HANA example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "SAPHana",
      "connectionDetails": {
        "server": "My-SapHana-Server",
        "database": "My-SapHana-Database"
      },
      "datasourceId": "33cc5222-3fb9-44f7-b19d-ffbff18aaaf5",
      "gatewayId": "0a2dafe6-0e93-4120-8d2c-fae123c111b1"
    }
  ]
}

SharePoint example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "SharePointList",
      "connectionDetails": {
        "url": "https://microsoft.sharepoint.com/hello/myproj/"
      },
      "datasourceId": "33cc5222-3fb9-44f7-b19d-ffbff18aaaf5",
      "gatewayId": "0a2dafe6-0e93-4120-8d2c-fae123c111b1"
    }
  ]
}

SQL example

Sample Request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources

Sample Response

{
  "value": [
    {
      "datasourceType": "Sql",
      "connectionDetails": {
        "server": "My-As-Server",
        "database": "My-As-Database"
      },
      "datasourceId": "33cc5222-3fb9-44f7-b19d-ffbff18aaaf5",
      "gatewayId": "0a2dafe6-0e93-4120-8d2c-fae123c111b1"
    }
  ]
}

定义

名称 说明
Datasource

Power BI 数据源

DatasourceConnectionDetails

Power BI 数据源连接详细信息。 请参阅 “获取数据源 ”或 “在组中获取数据源”中的示例。

Datasources

Power BI 数据源集合的 OData 响应包装器

Datasource

Power BI 数据源

名称 类型 说明
connectionDetails

DatasourceConnectionDetails

数据源连接详细信息

connectionString

string

(已弃用) 数据源连接字符串。 仅适用于 DirectQuery。

datasourceId

string

绑定数据源 ID,在未绑定到网关时为空

datasourceType

string

数据源类型

gatewayId

string

绑定网关 ID,在未绑定到网关时为空。 使用网关群集时,网关 ID 是指群集中第一个) 网关的主 (,类似于网关群集 ID。

name

string

(已弃用) 数据源名称。 仅适用于 DirectQuery。

DatasourceConnectionDetails

Power BI 数据源连接详细信息。 请参阅 “获取数据源 ”或 “在组中获取数据源”中的示例。

名称 类型 说明
account

string

连接帐户

classInfo

string

连接类信息

database

string

连接数据库

domain

string

连接域

emailAddress

string

连接电子邮件地址

kind

string

连接类型

loginServer

string

连接登录服务器

path

string

连接路径

server

string

连接服务器

url

string

连接 URL

Datasources

Power BI 数据源集合的 OData 响应包装器

名称 类型 说明
odata.context

string

OData 上下文

value

Datasource[]

数据源集合