ExecuteAutomationScheduledTask - 立即运行定时任务

更新时间:
复制 MD 格式

适用版本

中心版、Region版

服务接入点与授权信息

产品

资源

所需权限

组织管理

自动化定时任务

读写

请求语法

中心版

POST https://{domain}/oapi/v1/platform/organizations/{organizationId}/automation/scheduled-tasks/{name}/trigger

Region版

POST https://{domain}/oapi/v1/platform/automation/scheduled-tasks/{name}/trigger

请求头

参数

类型

是否必填

描述

示例值

x-yunxiao-token

string

是

个人访问令牌。

pt-0fh3****0fbG_35af****0484

请求参数

参数

类型

位置

是否必填

描述

示例值

organizationId

string

path

  • 是:中心版

  • 否:Region版

组织 ID。

name

string

path

是

任务名称。

请求示例

中心版

curl -X 'POST' \
  'https://{domain}/oapi/v1/platform/organizations/{organizationId}/automation/scheduled-tasks/{name}/trigger' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region版

curl -X 'POST' \
  'https://{domain}/oapi/v1/platform/automation/scheduled-tasks/{name}/trigger' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

返回参数

参数

类型

描述

示例值

-

object

detail

string

未启动时的原因说明。

eventId

string

本次触发的事件 ID,可用于 runs?eventId= 跟踪执行结果。

manual:r-1:202607141200

runId

string

运行 ID;仅已启动时返回。

started

boolean

本次运行是否已启动。

true

status

string

引擎触发状态原值,可能的值:[MATCHED SKIPPED CONDITION_ERROR]。

MATCHED

triggeredAt

string

触发时间。

返回示例

{
    "detail": "",
    "eventId": "manual:r-1:202607141200",
    "runId": "",
    "started": true,
    "status": "MATCHED",
    "triggeredAt": ""
}

错误码

访问错误码中心查看 API 相关错误码。