Datasets - Update Refresh Schedule

更新指定语义模型的刷新计划。 语义模型可以驻留在 “我的工作区 ”或其他工作区中,前提是调用方具有所需的权限。

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

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

Permissions

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

所需范围

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

好的

示例

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/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/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshSchedule
{
  "value": {
    "notifyOption": "NoNotification"
  }
}

示例响应

Disable a scheduled refresh example

示例请求

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

示例响应

定义

名称 说明
days

执行刷新的天数

RefreshSchedule

导入模型的 Power BI 刷新计划

RefreshScheduleRequest

Power BI 刷新计划请求

ScheduleNotifyOption

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

days

执行刷新的天数

值 说明
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday

RefreshSchedule

导入模型的 Power BI 刷新计划

名称 类型 说明
days

days[]

执行刷新的天数

enabled

boolean

是否启用刷新

localTimeZoneId

string

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

notifyOption

ScheduleNotifyOption

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

times

string[]

执行刷新的一天中的时间

RefreshScheduleRequest

Power BI 刷新计划请求

名称 类型 说明
value

RefreshSchedule

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

ScheduleNotifyOption

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

值 说明
NoNotification

不会发送通知

MailOnFailure

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