March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello, is it possible, to set a scheduled refresh of a dataset programmatically,
via the Power BI API? I use the API v2.
If not, is it possible to make a configuration in Power BI Service, so that all newly uploaded datasets
have automatically a scheduled refresh?
Kind regards,
Jan
Solved! Go to Solution.
I'm not even sure you can do that. You might be able. But it won't be very straight foward. I'm not sure about the C# methods but I can talk about the API.
You will need to take a look at 3 o 4 requests you can call to try this. Even though every request has limitations, so you might need to read them and be sure you can build something like that.
I can only help you pointing the requests you might need. That might be all because the rest is coding a custom script or back end app scenario.
After importing you might need to understand the sources in dataset. Get Datasources in Group from dataset and keep those ids. Depending on the type (cloud or onpremise), you might need to Bind to Gateway In Group those sources. At the end you might be able to Update Schedule Refresh in Group sending the time and stuff (it is easier to understand it if you have configured it completely manual at least one time)
You might need to take a look at Update Datasources in Group if you already have them and you are just updating stuff.
You can find the datasets requests here: https://docs.microsoft.com/en-us/rest/api/power-bi/datasets
I have writen the same names (italic format) in the paragraph so you can find them.
I hope that make sense
Happy to help!
Hi! despite of the fact that you can do it via API, I would suggest not to if this is your first time with Power Bi. You can handle all of it with the Power Bi UI. You can configure schedule refresh for datasets and it's sources credentials (for cloud sources) and the on premise gateway (for onpremise sources). You can read more about it here: https://docs.microsoft.com/en-us/power-bi/report-server/configure-scheduled-refresh
Once you know that you might be able to understand which requests you need to run in the API to make a similar behavior: https://docs.microsoft.com/en-us/rest/api/power-bi/datasets
I hope that helps,
Happy to help!
Hi, yes, I saw I can do it in the UI. Problem is, we have a web portal where users can upload PBI reports to PB Service. It would be very helpful if we could configure the scheduled refresh already during upload, so that admin does not need to do it in the PBS.
What would be the correct api operation using C#?
I'm not even sure you can do that. You might be able. But it won't be very straight foward. I'm not sure about the C# methods but I can talk about the API.
You will need to take a look at 3 o 4 requests you can call to try this. Even though every request has limitations, so you might need to read them and be sure you can build something like that.
I can only help you pointing the requests you might need. That might be all because the rest is coding a custom script or back end app scenario.
After importing you might need to understand the sources in dataset. Get Datasources in Group from dataset and keep those ids. Depending on the type (cloud or onpremise), you might need to Bind to Gateway In Group those sources. At the end you might be able to Update Schedule Refresh in Group sending the time and stuff (it is easier to understand it if you have configured it completely manual at least one time)
You might need to take a look at Update Datasources in Group if you already have them and you are just updating stuff.
You can find the datasets requests here: https://docs.microsoft.com/en-us/rest/api/power-bi/datasets
I have writen the same names (italic format) in the paragraph so you can find them.
I hope that make sense
Happy to help!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
37 | |
22 | |
20 | |
10 | |
9 |
User | Count |
---|---|
58 | |
55 | |
22 | |
13 | |
11 |