Forum Discussion
PBI API - Retrieve the dataset ID of a paginated report
Hello,
Using the Power BI API, I'm trying to get the Dataset IDs of my dashboards and paginated reports, in order to get the schedule for those datasets. Paginated reports are using dahsboards Semantic Models as datasource.
For Dashboard, I'm simply using this endpoint : https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-reports-in-group
For Paginated Reports, I'm trying to use this endpoint : https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-datasources-in-group
But I'm returned a AnalysisServices datasource while I'm trying to get a semantic model id.
Is there any way to retrieve those?
Thanks in advance.
The GUID in the database attribute is the ID of the semantic model.
6 Replies
- lbendlin
Super User
Dashboard=> ReportSemantic Models are SSAS Tabulair data sources. Can you show a sample output?
- JojoPBINew Member
This is what I'm getting using the reports/get-datasources-in-group on a paginated report with a power bi dashboard datasource:
{'@odata.context': 'https://wabi-north-europe-c-primary-redirect.analysis.windows.net/v1.0/myorg/groups/854896c8-90da-4a0f-82f5-4448c5afd379/$metadata#datasources', 'value': [{'name': 'DashboardsB2BFrance_EtatdeslieuxTeamMemberGCPublic', 'datasourceType': 'AnalysisServices', 'connectionDetails': {'server': 'pbiazure://api.powerbi.com/', 'database': 'sobe_wowvirtualserver-38fec1cc-26ff-4d35-9fa2-b9432efd2bb4'}, 'datasourceId': '212bbd5e-3267-4082-9e8c-44b23ce770f3', 'gatewayId': '5c4e0146-aa7a-4d52-b261-9ef8500cc23a'}]}Screenshot of my rdl report and its datasource:
- lbendlin
Super User
The GUID in the database attribute is the ID of the semantic model.
- YcPehFrequent Visitor
In case anyone does not understand the solution at first glance (I am one of them), the dataset Id is in the "value" > "connectionDetails" > "database". Mine is something like "
"sobe_wowvirtualserver-{DatasetId}""