Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'd like to be able to programmatically create a Cache Refresh Plan attached to a particular report hosted on our Report Server.
I can manually create a plan under "Scheduled refresh" when I manage the report via the Report Server web portal.
I have found documentation for the API here: https://learn.microsoft.com/en-us/rest/api/power-bi-report/cache-refresh-plans/add-cache-refresh-pla... ... However, there doesn't seem to be a sample body or template which I can model my own API call, and I don't seem to be able to catch the call in my browser network-watch dev tool . I have successfully done a few other API commands, like deleting and adding Power BI Reports.
Is there a location I can look for more thorough documentation, or can someone provide me with a sample?
Solved! Go to Solution.
I'm not sure why they moved away from using SwaggerHub for documentation, but the docs there still have an example of how to call this api https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/CacheRefreshPlans/AddCacheRefreshPlan And when I use the browser tools in Edge it captures the POST call to create a cache refresh plan.
Below is an example I captured when creating a scheduled refresh for my Power BI report called "local Adv Works"
{
"Owner": null,
"Description": "test2",
"CatalogItemPath": "/local Adv Wrks",
"EventType": "DataModelRefresh",
"Schedule": {
"ScheduleID": null,
"Definition": {
"StartDateTime": "2025-07-01T04:00:00+10:00",
"EndDateSpecified": false,
"EndDate": "1901-02-01T00:00:00+10:00",
"Recurrence": {
"DailyRecurrence": {
"DaysInterval": 1
}
}
}
},
"ScheduleDescription": "",
"ParameterValues": []
}
Hi @z-rmo ,
It’s great that you’ve already started working with the Power BI REST API and have had success with other commands. For the “Add Cache Refresh Plan” endpoint, you’re right — the documentation lacks a clear example of the request body, which can make it tricky to implement. Typically, this call requires a JSON payload that includes parameters like datasetId, notifyOption, and a days and times object to define the refresh schedule.
While Microsoft’s docs don’t always include examples, a good way to reverse-engineer the body is by using Fiddler or Postman with logging enabled, especially since browser dev tools often don’t catch service-to-service traffic.
Alternatively, the official GitHub repos or Power BI developer community forums sometimes have community-shared payload examples. If you like, I can help draft a sample JSON payload structure based on what you’re trying to schedule.
I'm not sure why they moved away from using SwaggerHub for documentation, but the docs there still have an example of how to call this api https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/CacheRefreshPlans/AddCacheRefreshPlan And when I use the browser tools in Edge it captures the POST call to create a cache refresh plan.
Below is an example I captured when creating a scheduled refresh for my Power BI report called "local Adv Works"
{
"Owner": null,
"Description": "test2",
"CatalogItemPath": "/local Adv Wrks",
"EventType": "DataModelRefresh",
"Schedule": {
"ScheduleID": null,
"Definition": {
"StartDateTime": "2025-07-01T04:00:00+10:00",
"EndDateSpecified": false,
"EndDate": "1901-02-01T00:00:00+10:00",
"Recurrence": {
"DailyRecurrence": {
"DaysInterval": 1
}
}
}
},
"ScheduleDescription": "",
"ParameterValues": []
}
Thank you for the Swagger link and the message body example! The Swagger will be a useful resource going forward--until Microsoft releases a new version of the API, I suppose.
Turns out that I was close, having modeled a JSON object from a GET response. However, I was providing a null "ID" value which was not wanted by the server for the POST.
I am using Power BI Report Server (January 2025), version 1.22.9153.7886.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
5 | |
4 | |
1 | |
1 | |
1 |
User | Count |
---|---|
8 | |
5 | |
4 | |
4 | |
2 |