Datasets - Update Direct Query Refresh Schedule In Group
Updates the refresh schedule for a specified DirectQuery or LiveConnection dataset from the specified workspace.
A request should contain either a set of days and times or a valid frequency, but not both. If you choose a set of days without specifying any times, then Power BI will use a default single time per day. Setting the frequency will automatically overwrite the days and times setting.
Permissions
- The user must be the dataset owner.
- This API call can be called by a service principal profile. For more information see: Service principal profiles in Power BI Embedded.
Required Scope
Dataset.ReadWrite.All
PATCH https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/directQueryRefreshSchedule
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
dataset
|
path | True |
string |
The dataset ID |
group
|
path | True |
string uuid |
The workspace ID |
Request Body
Name | Required | Type | Description |
---|---|---|---|
value | True |
An object containing the refresh schedule details for DirectQuery or LiveConnection |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
Examples
Set a days and times based schedule example |
Set a frequency based schedule example |
Update the times of an existing days and times based schedule example |
Set a days and times based schedule example
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
Set a frequency based schedule example
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
Update the times of an existing days and times based schedule example
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
Name | Description |
---|---|
days |
The days on which to execute the refresh |
Direct |
A Power BI refresh schedule for DirectQuery or LiveConnection, specifying either the frequency or a combination of days and times. |
Direct |
Power BI refresh schedule request for DirectQuery or LiveConnection |
days
The days on which to execute the refresh
Name | Type | Description |
---|---|---|
Friday |
string |
|
Monday |
string |
|
Saturday |
string |
|
Sunday |
string |
|
Thursday |
string |
|
Tuesday |
string |
|
Wednesday |
string |
DirectQueryRefreshSchedule
A Power BI refresh schedule for DirectQuery or LiveConnection, specifying either the frequency or a combination of days and times.
Name | Type | Description |
---|---|---|
days |
days[] |
The days on which to execute the refresh |
frequency |
integer |
The interval in minutes between successive refreshes. Supported values are 15, 30, 60, 120, and 180. |
localTimeZoneId |
string |
The ID of the time zone to use. For more information, see Time zone info |
times |
string[] |
The times of day to execute the refresh |
DirectQueryRefreshScheduleRequest
Power BI refresh schedule request for DirectQuery or LiveConnection
Name | Type | Description |
---|---|---|
value |
An object containing the refresh schedule details for DirectQuery or LiveConnection |