Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Power BI REST API - Dataflows - Disable refresh schedule error

Hi,

 

The disable refresh schedule for dataflows REST API is throwing an error. 

 

Request (replace $(workspaceId) and $(dataflowId) with the appropriate values): 

 

PATCH https://api.powerbi.com/v1.0/myorg/groups/$($workspaceId)/dataflows/$($dataflowId)/refreshSchedule

 

Body:

 

{
  "value": {
    "enabled": false
  }
}

 

Response:

 

{
    "error": {
        "code": "InvalidRequest",
        "message": "Refresh schedule time zone id is not valid"
    }
}

 

Adding the "localTimeZoneId""UTC" property will throw another error...

{
  "value": {
    "enabled": false,
    "localTimeZoneId": "UTC"
  }
}

 

{
    "error": {
        "code": "",
        "message": "An error has occurred."
    }
}

 

 

Reference to docs: https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows/update-refresh-schedule#disable-schedul...

 

Regards,

Alex

Status: New
Comments
v-chuncz-msft
Community Support

@alex_chiraples 

 

Based on my test, you may add times property.

alex_chiraples
Frequent Visitor

@v-chuncz-msft , thanks for the update. I've tested with times property, it throws the same error.

I've done some additional tests and the only way to get it working was to add days and times properties.

 

Working example for body:

{
  "value": {
    "enabled": false,
    "days": [
        "Sunday"
    ],
    "times": [
       "00:00"
   ],
   "localTimeZoneId": "UTC"
  }
}

 

Is this the expected behavior for this API? 

 

Regards,

Alex