Forum Discussion
Can report and dataset refresh dates be extracted using the scanner API?
For a number of years now, we use the scanner API to extract details of our Power BI implementation (work spaces, reports, datasets et cetera).
The API results in some Jason files, which are then read and imported into our database, to build up a history.
I know I need to bring back information about report and dataset refresh dates and also identify where the refresh has been disabled because of three errors.
Firstly I have checked that this information does not exist in the Jason files, created by the scanner API call. I have looked at the options for the scanner and while two of the options are turned off, I do not believe that turning these options on will give me the information required.
The scanner API has the following options:-
datasetExpressions
datasetSchema
datasourceDetails
getArtifactUsers
lineage
The first two are set to false and the remaining three are set to true.
Tomorrow, I intend to investigate other Apis. However, I am an administrator and therefore I can only run the Admin Apis. Obviously, the Admin methods usually have a limitation of how many times you can call them each hour and we have more than a hundred reports, for example.
Can anyone advise please?
Thanks
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
3 Replies
- v-prasareCommunity Support
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
- v-prasareCommunity Support
Hi Dragon496,
We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support - v-prasareCommunity Support
Hi @Dragon496,
We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support