Datasets - Update Direct Query Refresh Schedule In Group

Updates the refresh schedule for the specified DirectQuery or LiveConnection dataset from the specified workspace.

This operation is only supported for the dataset owner.
A request should contain either a combination of days and times (setting times is optional, otherwise a default single time per day is used) or a valid frequency, but not both.
Setting frequency will automatically truncate the days and times arrays.

Required scope: Dataset.ReadWrite.All
To set the permissions scope, see Register an app.

PATCH https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/directQueryRefreshSchedule

URI Parameters

Name In Required Type Description
groupId
path True
  • string
uuid

The workspace id

datasetId
path True
  • string

The dataset id

Request Body

Name Required Type Description
value True

An object containg the refresh schedule details for DirectQuery or LiveConnection

Responses

Name Type Description
200 OK

OK

Examples

change to frequency based schedule
disable scheduled refresh
switch to days and times based schedule
update the times of existing days based schedule

change to frequency based schedule

Sample Request

PATCH https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/directQueryRefreshSchedule
{
  "value": {
    "frequency": 30
  }
}

Sample Response

disable scheduled refresh

Sample Request

PATCH https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/directQueryRefreshSchedule
{
  "value": {
    "enabled": false
  }
}

Sample Response

switch to days and times based schedule

Sample Request

PATCH https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/directQueryRefreshSchedule
{
  "value": {
    "days": [
      "Sunday",
      "Tuesday",
      "Friday",
      "Saturday"
    ],
    "times": [
      "07:00",
      "11:30",
      "16:00",
      "23:30"
    ],
    "localTimeZoneId": "UTC"
  }
}

Sample Response

update the times of existing days based schedule

Sample Request

PATCH https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/directQueryRefreshSchedule
{
  "value": {
    "times": [
      "07:00",
      "16:30",
      "23:30"
    ]
  }
}

Sample Response

Definitions

DirectQueryRefreshSchedule

A Power BI refresh schedule for DirectQuery or LiveConnection, specified by setting either the frequency or a combination of days and times.

DirectQueryRefreshScheduleRequest

Power BI refresh schedule request for DirectQuery or LiveConnection

DirectQueryRefreshSchedule

A Power BI refresh schedule for DirectQuery or LiveConnection, specified by setting either the frequency or a combination of days and times.

Name Type Description
days
  • string[]

Days to execute the refresh

frequency
  • integer

the refresh frequency in minutes, supported values are 15, 30, 60, 120, and 180.

localTimeZoneId
  • string

The Id of the Time zone to use. See Name of Time Zone column in Microsoft Time Zone Index Values.

times
  • string[]

Times to execute the refresh within each day

DirectQueryRefreshScheduleRequest

Power BI refresh schedule request for DirectQuery or LiveConnection

Name Type Description
value

An object containg the refresh schedule details for DirectQuery or LiveConnection