Datasets - Get Datasources
從 [我的工作區] 傳回指定資料集的資料來源清單。
必要範圍
Dataset.ReadWrite.All 或 Dataset.Read.All
GET https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/datasources
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
dataset
|
path | True |
string |
資料集識別碼 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
確定 |
範例
Analysis Services example
Sample Request
GET https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/datasources
Sample Response
{
"@odata.context": "http://api.powerbi.com/v1.0/myorg/groups/222f0f33-3abc-4a57-9f98-ff01bd2aaabb/$metadata#datasources",
"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/datasets/{datasetId}/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/datasets/{datasetId}/datasources
Sample Response
{
"@odata.context": "http://api.powerbi.com/v1.0/myorg/groups/222f0f33-3abc-4a57-9f98-ff01bd2aaabb/$metadata#datasources",
"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/datasets/{datasetId}/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/datasets/{datasetId}/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/datasets/{datasetId}/datasources
Sample Response
{
"@odata.context": "http://api.powerbi.com/v1.0/myorg/groups/222f0f33-3abc-4a57-9f98-ff01bd2aaabb/$metadata#datasources",
"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/datasets/{datasetId}/datasources
Sample Response
{
"@odata.context": "http://api.powerbi.com/v1.0/myorg/groups/222f0f33-3abc-4a57-9f98-ff01bd2aaabb/$metadata#datasources",
"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/datasets/{datasetId}/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/datasets/{datasetId}/datasources
Sample Response
{
"@odata.context": "http://api.powerbi.com/v1.0/myorg/groups/222f0f33-3abc-4a57-9f98-ff01bd2aaabb/$metadata#datasources",
"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/datasets/{datasetId}/datasources
Sample Response
{
"@odata.context": "http://api.powerbi.com/v1.0/myorg/groups/222f0f33-3abc-4a57-9f98-ff01bd2aaabb/$metadata#datasources",
"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/datasets/{datasetId}/datasources
Sample Response
{
"@odata.context": "http://api.powerbi.com/v1.0/myorg/groups/222f0f33-3abc-4a57-9f98-ff01bd2aaabb/$metadata#datasources",
"value": [
{
"datasourceType": "Sql",
"connectionDetails": {
"server": "My-As-Server",
"database": "My-As-Database"
},
"datasourceId": "33cc5222-3fb9-44f7-b19d-ffbff18aaaf5",
"gatewayId": "0a2dafe6-0e93-4120-8d2c-fae123c111b1"
}
]
}
定義
名稱 | Description |
---|---|
Datasource |
Power BI 資料來源 |
Datasource |
Power BI 資料來源連線詳細資料。 請參閱 取得資料來源 或 取得群組中的資料來源範例。 |
Datasources |
Power BI 資料來源集合的 OData 回應包裝函式 |
Datasource
Power BI 資料來源
名稱 | 類型 | Description |
---|---|---|
connectionDetails |
資料來源連線詳細資料 |
|
connectionString |
string |
(已淘汰) 資料來源連接字串。 僅適用于 DirectQuery。 |
datasourceId |
string |
系結資料來源識別碼,當未系結至閘道時,這是空的 |
datasourceType |
string |
資料來源類型 |
gatewayId |
string |
系結閘道識別碼,在未系結至閘道時是空的。 使用閘道叢集時,閘道識別碼是指叢集中第一個) 閘道的主要 (,類似于閘道叢集識別碼。 |
name |
string |
() 資料來源名稱已被取代。 僅適用于 DirectQuery。 |
DatasourceConnectionDetails
Power BI 資料來源連線詳細資料。 請參閱 取得資料來源 或 取得群組中的資料來源範例。
名稱 | 類型 | Description |
---|---|---|
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 回應包裝函式
名稱 | 類型 | Description |
---|---|---|
odata.context |
string |
OData 內容 |
value |
資料來源集合 |