Forum Discussion
Power BI rest API Dataset Refresh History report, unable to refresh on Workspace
Hi AthomePBI762489 ,
Do I understand that you have two problems?
1. Unable to retrieve refreshes for each dataset.
2. Keep the reporting updating in PBI service.
Correct?
Yes,
1. I am able to get refresh data when I Pass a single dataset ID
I am Trying to get refresh history data for all datasets as a group without having to specify a single dataset at a time.
2. Yes be able to publish this data on a workspace for the team to use
- Migasuke3 years ago
Memorable Member
Hi again,
1. Depends what you want to achieve with those Last N refreshes but you might consider this API:
https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-refreshables
You need to be admin to use it and generally speaking those Admin APIs are quite powerfull.
In case you won't find it helpful you need to write a script with a loop where you actually query each dataset separately and merge the responses into one output.
Basically you will send one request to obtain all Dataset IDs and for each apply the next request.
2. In case you want to publish the report and keep it up to date by itself I have a bad news for you. It is possible but it requires quite a lot of preparations, which involve lot of Azure resources.
I can briefly describe the process:
1. Create and registr your Azure App for authentication.
2. Create a Azure function or anything where you can run your script in a cloud.
3. Run your script with authentication using Azure App secret and ID.
4. Save your API responses in some storage (blob, Azure SQL etc..)
5. Connect to the storage and then your report can run automaticaly.
As you can see, it's a quite a lot of time and effort to implement. BUT it is still possible.- AthomePBI7624893 years agoNew Member
I have tried this API https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-refreshables
it is getting 0 result
- Migasuke3 years ago
Memorable Member
Do you fulfill requirements?