Datasets - Update Direct Query Refresh Schedule In Group
从指定的工作区更新指定 DirectQuery 或 LiveConnection 数据集的刷新计划。
请求应包含一组天数和时间 或 有效频率,但不能同时包含这两者。 如果选择一组天数而不指定任何时间,则 Power BI 将使用每天的默认单一时间。 设置频率将自动覆盖日期和时间设置。
Permissions
- 用户必须是数据集所有者。
- 此 API 调用可由服务主体配置文件调用。 有关详细信息,请参阅: Power BI Embedded 中的服务主体配置文件。
所需范围
Dataset.ReadWrite.All
PATCH https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/directQueryRefreshSchedule
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
dataset
|
path | True |
string |
数据集 ID |
|
group
|
path | True |
string (uuid) |
工作区 ID |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| value | True |
包含 DirectQuery 或 LiveConnection 的刷新计划详细信息的对象 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
好的 |
示例
| 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
示例请求
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"
}
}
示例响应
Set a frequency based schedule example
示例请求
PATCH https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/directQueryRefreshSchedule
{
"value": {
"frequency": 30
}
}
示例响应
Update the times of an existing days and times based schedule example
示例请求
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"
]
}
}
示例响应
定义
| 名称 | 说明 |
|---|---|
| days |
执行刷新的天数 |
|
Direct |
DirectQuery 或 LiveConnection 的 Power BI 刷新计划,指定频率或天数和时间的组合。 |
|
Direct |
DirectQuery 或 LiveConnection 的 Power BI 刷新计划请求 |
days
执行刷新的天数
| 值 | 说明 |
|---|---|
| Monday | |
| Tuesday | |
| Wednesday | |
| Thursday | |
| Friday | |
| Saturday | |
| Sunday |
DirectQueryRefreshSchedule
DirectQuery 或 LiveConnection 的 Power BI 刷新计划,指定频率或天数和时间的组合。
| 名称 | 类型 | 说明 |
|---|---|---|
| days |
days[] |
执行刷新的天数 |
| frequency |
integer |
连续刷新之间的间隔(以分钟为单位)。 支持的值为 15、 30、 60、 120 和 180。 |
| localTimeZoneId |
string |
要使用的时区的 ID。 有关详细信息,请参阅 时区信息 |
| times |
string[] |
执行刷新的一天中的时间 |
DirectQueryRefreshScheduleRequest
DirectQuery 或 LiveConnection 的 Power BI 刷新计划请求
| 名称 | 类型 | 说明 |
|---|---|---|
| value |
包含 DirectQuery 或 LiveConnection 的刷新计划详细信息的对象 |