Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I am trying to disable a scheduled refresh on a dataset, using Power BI for C#. I can sucessfully add a scheduled refresh by using the below code.
var refreshSchedule = new RefreshSchedule(days, times, true, "UTC", ScheduleNotifyOption.NoNotification);
powerBiClient.Datasets.UpdateRefreshScheduleInGroup(new Guid(workspaceId), datasetId, refreshSchedule);
I tried to retrieve the existing schedule and setting Enabled = false,
var refreshSchedule = powerBiClient.Datasets.GetRefreshScheduleInGroup(new Guid(workspaceId), datasetId);
refreshSchedule.Enabled = false;
powerBiClient.Datasets.UpdateRefreshScheduleInGroup(new Guid(workspaceId), datasetId, refreshSchedule);
as well as just adding a new, disabled schedule,
var refreshSchedule = new RefreshSchedule(null, null, false, "UTC", ScheduleNotifyOption.NoNotification);
powerBiClient.Datasets.UpdateRefreshScheduleInGroup(new Guid(workspaceId), datasetId, refreshSchedule);
but either ways throws a Bad Request error.
Hi @janfcarl,
What type of workspace and contents are you working on? Any specific setting that you apply to the content you used? Have you confirmed the permission setting that API required? Please share some more detail bout these operations to help us clarify and reproduce the scenario:
How to Get Your Question Answered Quickly
In addition, have you tried to directly test on the rest API document with 'try it' option?
Regards,
Xiaoxin Sheng
Does it work in the REST API sandbox?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |