Requirements, permissions, request and response fields, and error handling.
Request and permissions
POSThttps://openapi.qwenwork.ai/v1/scheduler/tasks/{id}/run-once
Authentication: Authorization: Bearer <access_token>. Use an access token obtained through user OAuth authorization.
Required business Scope: scheduler.task.run
Authorization types declared in the contract: Organization authorization (organization) and personal authorization (personal).
The platform must enable the Scope for your application. The user must have the relevant business permissions and access to the target resource. Availability of personal and organization authorization for your application depends on its console configuration.
Behavior and limitations
Use a user OAuth token with scheduler.task.run. Only user OAuth tokens are supported. Immediately triggers one execution using the current task configuration, without changing the task trigger, scheduling pool, or next scheduled firing time. The task must belong to the current user, have status active, and use cloud scheduling; otherwise, the API returns 403/404/409. Execution records are created asynchronously. Use correlation_id/fire_id to correlate logs.Path parameters
| Parameter | Type | Required | Description and constraints |
|---|---|---|---|
id | string | Yes | Task ID (UUID). Format: "uuid" |
Request body
The public contract does not declare a request body. Do not add identity fields or undeclared business fields.Success responses
Each business API retains its original response structure; no commoncode/msg/data wrapper is added.
HTTP 202
Manual execution event accepted. Response type:application/json
Copy
{
"causation_id": "manual:73abb1ac-8c5a-4538-95ba-97c06297ebce",
"correlation_id": "b6e4a3f0-1c2d-4e5f-8a9b-0c1d2e3f4a5b",
"fire_id": "c7f5b4e1-2d3e-4f5a-9b0c-1d2e3f4a5b6c",
"run_type": "manual",
"scheduled_fire_at": "2026-11-17T02:00:00Z",
"task_id": "73abb1ac-8c5a-4538-95ba-97c06297ebce"
}
| Field | Type | Required | Description and constraints |
|---|---|---|---|
causation_id | string | Yes | — |
correlation_id | string | Yes | — |
fire_id | string | Yes | — |
run_type | string | Yes | — |
scheduled_fire_at | string | Yes | Format: "date-time" |
task_id | string | Yes | Format: "uuid" |
Error responses
| HTTP | Description and handling |
|---|---|
400 | Invalid task ID or request. |
401 | User credentials are invalid, expired, or of an unsupported type. |
403 | Missing scheduler.task.run Scope, or the task does not belong to the current user. |
404 | The task does not exist or has been deleted. |
409 | The task cannot run now: it is paused (task_not_active) or does not use cloud scheduling (incompatible_run_type). |
429 | Platform rate limit reached. |
500 | Business processing failed. |
502 | Gateway upstream response failed. |
503 | Gateway or business dependency unavailable. |
504 | Request timed out. |
Complete field contract
The JSON below contains the complete request, response, and error schemas, nested constraints, and public extension definitions for this API. Copy it to verify the contract. Success examples not declared in the contract are not inferred.Expand the complete OpenAPI JSON
Expand the complete OpenAPI JSON
Copy
{
"components": {
"schemas": {
"Error": {
"additionalProperties": false,
"properties": {
"error": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
}
},
"required": [
"error"
],
"type": "object"
},
"GatewayError": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
},
"RunOnce": {
"additionalProperties": false,
"properties": {
"causation_id": {
"type": "string"
},
"correlation_id": {
"type": "string"
},
"fire_id": {
"type": "string"
},
"run_type": {
"type": "string"
},
"scheduled_fire_at": {
"format": "date-time",
"type": "string"
},
"task_id": {
"format": "uuid",
"type": "string"
}
},
"required": [
"task_id",
"scheduled_fire_at",
"run_type",
"correlation_id",
"fire_id",
"causation_id"
],
"type": "object"
}
},
"securitySchemes": {
"OpenPlatformBearer": {
"scheme": "bearer",
"type": "http"
}
}
},
"openapi": "3.1.0",
"paths": {
"/v1/scheduler/tasks/{id}/run-once": {
"post": {
"description": "Use a user OAuth token with scheduler.task.run. Only user OAuth tokens are supported. Immediately triggers one execution using the current task configuration, without changing the task trigger, scheduling pool, or next scheduled firing time. The task must belong to the current user, have status active, and use cloud scheduling; otherwise, the API returns 403/404/409. Execution records are created asynchronously. Use correlation_id/fire_id to correlate logs.",
"operationId": "runSchedulerTaskOnce",
"parameters": [
{
"description": "Task ID (UUID).",
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"202": {
"content": {
"application/json": {
"example": {
"causation_id": "manual:73abb1ac-8c5a-4538-95ba-97c06297ebce",
"correlation_id": "b6e4a3f0-1c2d-4e5f-8a9b-0c1d2e3f4a5b",
"fire_id": "c7f5b4e1-2d3e-4f5a-9b0c-1d2e3f4a5b6c",
"run_type": "manual",
"scheduled_fire_at": "2026-11-17T02:00:00Z",
"task_id": "73abb1ac-8c5a-4538-95ba-97c06297ebce"
},
"schema": {
"$ref": "#/components/schemas/RunOnce"
}
}
},
"description": "Manual execution event accepted.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"400": {
"content": {
"application/json": {
"example": {
"error": {
"code": "bad_request",
"message": "任务 ID 或请求不合法。"
}
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "Invalid task ID or request.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"401": {
"content": {
"application/json": {
"example": {
"error": {
"code": "unauthorized",
"message": "用户凭证无效、过期或凭证类型不支持。"
}
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "User credentials are invalid, expired, or of an unsupported type.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"403": {
"content": {
"application/json": {
"example": {
"error": {
"code": "forbidden",
"message": "缺少 scheduler.task.run Scope 或任务不属于当前用户。"
}
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "Missing scheduler.task.run Scope, or the task does not belong to the current user.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"404": {
"content": {
"application/json": {
"example": {
"error": {
"code": "not_found",
"message": "任务不存在或已删除。"
}
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "The task does not exist or has been deleted.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"409": {
"content": {
"application/json": {
"example": {
"error": {
"code": "task_not_active",
"message": "任务当前不可执行。"
}
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "The task cannot run now: it is paused (task_not_active) or does not use cloud scheduling (incompatible_run_type).",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"429": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "Platform rate limit reached.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"500": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "Business processing failed.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"502": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "Gateway upstream response failed.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"503": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "Gateway or business dependency unavailable.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"504": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Error"
},
{
"$ref": "#/components/schemas/GatewayError"
}
]
}
}
},
"description": "Request timed out.",
"headers": {
"X-Request-ID": {
"description": "Request ID generated by the open platform for each HTTP request, used for log correlation and troubleshooting. Retries generate a new ID. This is not an idempotency key or a distributed trace ID.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "OpenTelemetry TraceID for the current open platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if it was not retained by sampling.",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
}
},
"security": [
{
"OpenPlatformBearer": []
}
],
"summary": "Run a scheduled task now",
"tags": [
"定时任务"
]
}
}
},
"info": {
"title": "Run a scheduled task now",
"version": "2026-11-24"
},
"servers": [
{
"url": "https://openapi.qwenwork.ai"
}
]
}