Datasets - Update Refresh Schedule In Group
从指定的工作区更新指定数据集的刷新计划。
禁用刷新计划的请求不应包含其他更改。
必须至少指定一天。 如果未指定时间,Power BI 将每天使用默认的单个时间。
Permissions
- 用户必须是数据集所有者。
- 此 API 调用可由服务主体配置文件调用。 有关详细信息,请参阅: Power BI Embedded 中的服务主体配置文件。
所需范围
Dataset.ReadWrite.All
局限性
每天时间段数的限制取决于是使用 高级 容量还是共享容量。
PATCH https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshSchedule
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
dataset
|
path | True |
string |
数据集 ID |
|
group
|
path | True |
string (uuid) |
工作区 ID |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| value | True |
包含刷新计划详细信息的对象 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
好的 |
示例
| Change the days and times of a refresh schedule example |
| Change the notification option of a refresh schedule example |
| Disable a scheduled refresh example |
| Update the times of a refresh schedule example |
Change the days and times of a refresh schedule example
示例请求
PATCH https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshSchedule
{
"value": {
"days": [
"Sunday",
"Tuesday",
"Friday",
"Saturday"
],
"times": [
"07:00",
"11:30",
"16:00",
"23:30"
],
"localTimeZoneId": "UTC"
}
}
示例响应
Change the notification option of a refresh schedule example
示例请求
PATCH https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshSchedule
{
"value": {
"notifyOption": "NoNotification"
}
}
示例响应
Disable a scheduled refresh example
示例请求
PATCH https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshSchedule
{
"value": {
"enabled": false
}
}
示例响应
Update the times of a refresh schedule example
示例请求
PATCH https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshSchedule
{
"value": {
"times": [
"08:00",
"16:00"
]
}
}
示例响应
定义
| 名称 | 说明 |
|---|---|
| days |
执行刷新的天数 |
|
Refresh |
导入模型的 Power BI 刷新计划 |
|
Refresh |
Power BI 刷新计划请求 |
|
Schedule |
计划刷新终止的通知选项。 服务主体仅支持 |
days
执行刷新的天数
| 值 | 说明 |
|---|---|
| Monday | |
| Tuesday | |
| Wednesday | |
| Thursday | |
| Friday | |
| Saturday | |
| Sunday |
RefreshSchedule
导入模型的 Power BI 刷新计划
| 名称 | 类型 | 说明 |
|---|---|---|
| days |
days[] |
执行刷新的天数 |
| enabled |
boolean |
是否启用刷新 |
| localTimeZoneId |
string |
要使用的时区的 ID。 有关详细信息,请参阅 时区信息。 |
| notifyOption |
计划刷新终止的通知选项。 服务主体仅支持 |
|
| times |
string[] |
执行刷新的一天中的时间 |
RefreshScheduleRequest
Power BI 刷新计划请求
| 名称 | 类型 | 说明 |
|---|---|---|
| value |
包含刷新计划详细信息的对象 |
ScheduleNotifyOption
计划刷新终止的通知选项。 服务主体仅支持 NoNotification 该值。
| 值 | 说明 |
|---|---|
| NoNotification |
不会发送通知 |
| MailOnFailure |
刷新失败时将发送邮件通知 |