Datasets - Update Refresh Schedule

“我的工作区”中汇报指定数据集的刷新计划。

禁用刷新计划的请求不应包含任何其他更改。

必须至少指定一天。 如果未指定任何时间,则 Power BI 将每天使用默认的单次。

权限

用户必须是数据集所有者。

必需范围

Dataset.ReadWrite.All

限制

每天的时间段数限制取决于是使用 高级 容量还是共享容量。

PATCH https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshSchedule

URI 参数

名称 必需 类型 说明
datasetId
path True

string

数据集 ID

请求正文

名称 必需 类型 说明
value True

RefreshSchedule

包含刷新计划详细信息的 对象

响应

名称 类型 说明
200 OK

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

Sample Request

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

Sample Response

Change the notification option of a refresh schedule example

Sample Request

PATCH https://api.powerbi.com/v1.0/myorg/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshSchedule
{
  "value": {
    "notifyOption": "NoNotification"
  }
}

Sample Response

Disable a scheduled refresh example

Sample Request

PATCH https://api.powerbi.com/v1.0/myorg/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshSchedule
{
  "value": {
    "enabled": false
  }
}

Sample Response

Update the times of a refresh schedule example

Sample Request

PATCH https://api.powerbi.com/v1.0/myorg/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshSchedule
{
  "value": {
    "times": [
      "08:00",
      "16:00"
    ]
  }
}

Sample Response

定义

名称 说明
days

执行刷新的日期

RefreshSchedule

导入模型的 Power BI 刷新计划

RefreshScheduleRequest

Power BI 刷新计划请求

ScheduleNotifyOption

计划刷新终止的通知选项。 服务主体仅支持 NoNotification 值。

days

执行刷新的日期

名称 类型 说明
Friday

string

Monday

string

Saturday

string

Sunday

string

Thursday

string

Tuesday

string

Wednesday

string

RefreshSchedule

导入模型的 Power BI 刷新计划

名称 类型 说明
NotifyOption

ScheduleNotifyOption

计划刷新终止的通知选项。 服务主体仅支持 NoNotification 值。

days

days[]

执行刷新的日期

enabled

boolean

是否启用刷新

localTimeZoneId

string

要使用的时区的 ID。 有关详细信息,请参阅 时区信息

times

string[]

执行刷新的一天中的时间

RefreshScheduleRequest

Power BI 刷新计划请求

名称 类型 说明
value

RefreshSchedule

包含刷新计划详细信息的 对象

ScheduleNotifyOption

计划刷新终止的通知选项。 服务主体仅支持 NoNotification 值。

名称 类型 说明
MailOnFailure

string

刷新失败时将发送邮件通知

NoNotification

string

不会发送通知