Forum Discussion
h4tt3n
5 years agoHelper V
Keep getting a 400 Bad Request error when trying to update refresh schedule via API
Hello folks, I am developing Power BI reports and managing them via API calls as a part of my job. I have developed a number of powershell scripts to streamline management via the rest API. It al...
- 5 years ago
Always test your API calls in the sandbox.
Datasets - Update Refresh Schedule In Group (Power BI Power BI REST APIs) | Microsoft Docs
Refreshes can only be scheduled at :00 and :30 (top and bottom of hour). You can't supply a random minute number.
lbendlin
4 years agoSuper User
This works for me:
$uri = "https://api.powerbi.com/v1.0/myorg/groups/$groupsPath/datasets/$datasetID/refreshSchedule"
$body = "{ value : { enabled :`"true`" }}"
$res = Invoke-RestMethod -Uri $uri –Headers $authHeader –Method PATCH -body $body