Forum Discussion
Can report and dataset refresh dates be extracted using the scanner API?
- 2 months ago
Hi Dragon496,
the Scanner API doesn’t currently expose dataset/report refresh details such as last refresh time, refresh history, or whether refresh has been disabled. It’s designed more for inventory, lineage, and metadata discovery, so refresh-related operational data isn’t included in the scan output.
To achieve what you’re looking for, the recommended approach is to combine the Scanner API with Power BI REST APIs:
You can continue using the Scanner API to build your inventory (workspaces, reports, datasets), and then enrich that dataset using refresh-specific APIs.
- Use the Scanner API to extract and store Dataset IDs across your tenant.
- For each dataset, call the Get Refresh History API to retrieve:
- Refresh start/end time
- Status (Success/Failed)
- Error details (useful for identifying failures/disabled scenarios)
- Optionally use dataset-level APIs to pull additional metadata if needed.
At scale, this usually looks like a two-step process:
- Run your existing Scanner API process to maintain a catalog of artifacts.
- Use that catalog to drive incremental calls to the refresh history endpoint and store the results in your database for tracking and historical analysis.
Since you mentioned a large number of datasets, do plan for API throttling limits—batching requests and implementing retry logic will help when working with Admin APIs.
For reference:
- https://learn.microsoft.com/rest/api/power-bi/datasets/get-refresh-history
- https://learn.microsoft.com/rest/api/power-bi/admin/workspace-info-get-scan-result
- https://learn.microsoft.com/rest/api/power-bi/admin
Also, there isn’t a direct flag via the Scanner API to indicate “refresh disabled due to failures,” so this typically needs to be inferred from refresh history + failure patterns rather than a single field.
Thanks,
Prashanth
Hi Dragon496,
the Scanner API doesn’t currently expose dataset/report refresh details such as last refresh time, refresh history, or whether refresh has been disabled. It’s designed more for inventory, lineage, and metadata discovery, so refresh-related operational data isn’t included in the scan output.
To achieve what you’re looking for, the recommended approach is to combine the Scanner API with Power BI REST APIs:
You can continue using the Scanner API to build your inventory (workspaces, reports, datasets), and then enrich that dataset using refresh-specific APIs.
- Use the Scanner API to extract and store Dataset IDs across your tenant.
- For each dataset, call the Get Refresh History API to retrieve:
- Refresh start/end time
- Status (Success/Failed)
- Error details (useful for identifying failures/disabled scenarios)
- Optionally use dataset-level APIs to pull additional metadata if needed.
At scale, this usually looks like a two-step process:
- Run your existing Scanner API process to maintain a catalog of artifacts.
- Use that catalog to drive incremental calls to the refresh history endpoint and store the results in your database for tracking and historical analysis.
Since you mentioned a large number of datasets, do plan for API throttling limits—batching requests and implementing retry logic will help when working with Admin APIs.
For reference:
- https://learn.microsoft.com/rest/api/power-bi/datasets/get-refresh-history
- https://learn.microsoft.com/rest/api/power-bi/admin/workspace-info-get-scan-result
- https://learn.microsoft.com/rest/api/power-bi/admin
Also, there isn’t a direct flag via the Scanner API to indicate “refresh disabled due to failures,” so this typically needs to be inferred from refresh history + failure patterns rather than a single field.
Thanks,
Prashanth