Requirements, permissions, request and response fields, and error handling.
Request and permissions
POST https://openapi.qwenwork.ai/v1/scheduler/tasks/{id}/pause
Authentication: Authorization: Bearer <access_token>. Use an access token obtained through user OAuth authorization.
Required business Scope: scheduler.task.pause
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.pause. Only user OAuth tokens are supported. Sets the task status to paused and removes it from the cloud scheduling pool, so it no longer fires while paused. Only the task owner can pause it. A nonexistent or deleted task returns 404. Identity parameters such as user_id, as well as query parameters, are not accepted.
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 common code/msg/data wrapper is added.
HTTP 200
Success. Returns the updated task object.
Response type: application/json
| Field | Type | Required | Description and constraints |
|---|---|---|---|
action | object | Yes | Additional properties: false |
action.execution_target | object | Yes | Additional properties: false |
action.execution_target.device_id | string | No | Required for desktop; must not be provided for cloud. |
action.execution_target.device_name | string | No | — |
action.execution_target.kind | string | Yes | Allowed values: ["cloud", "desktop"] |
created_at | string | Yes | Format: "date-time" |
delete_after_run | boolean | Yes | Can be true only for an at trigger. Default: false |
description | string | Yes | — |
id | string | Yes | Format: "uuid" |
name | string | Yes | Minimum length: 1 Maximum length: 100 |
status | string | Yes | Default: "active" Allowed values: ["active", "paused"] |
target | object | Yes | Additional properties: false |
target.kind | string | Yes | — |
target.payload | object | Yes | Additional properties: "Subject to schema constraints; see the complete contract" |
trigger | object | Yes | — |
trigger | object | Yes | Exactly one branch must match: branch 1 Additional properties: false |
trigger.kind | string | Yes | Exactly one branch must match: branch 1 Constant value: "at" |
trigger.spec | object | Yes | Exactly one branch must match: branch 1 Additional properties: true |
trigger.spec.fire | string | Yes | Exactly one branch must match: branch 1 Format: "date-time" |
trigger.spec.rest_day | object | No | Exactly one branch must match: branch 1 Additional properties: true |
trigger.spec.rest_day.enabled | boolean | No | Exactly one branch must match: branch 1 — |
trigger.spec.rest_day.region | string | No | Exactly one branch must match: branch 1 — |
trigger.spec.rest_day.skip_on | string | No | Exactly one branch must match: branch 1 Allowed values: ["WORKDAY", "HOLIDAY"] |
trigger | object | Yes | Exactly one branch must match: branch 2 Additional properties: false |
trigger.kind | string | Yes | Exactly one branch must match: branch 2 Constant value: "every" |
trigger.spec | object | Yes | Exactly one branch must match: branch 2 Additional properties: true |
trigger.spec.interval_ns | integer | Yes | Exactly one branch must match: branch 2 Minimum (inclusive): 60000000000 Maximum (inclusive): 31536000000000000 |
trigger.spec.rest_day | object | No | Exactly one branch must match: branch 2 Additional properties: true |
trigger.spec.rest_day.enabled | boolean | No | Exactly one branch must match: branch 2 — |
trigger.spec.rest_day.region | string | No | Exactly one branch must match: branch 2 — |
trigger.spec.rest_day.skip_on | string | No | Exactly one branch must match: branch 2 Allowed values: ["WORKDAY", "HOLIDAY"] |
trigger.spec.start_from | string | Yes | Exactly one branch must match: branch 2 Format: "date-time" |
trigger | object | Yes | Exactly one branch must match: branch 3 Additional properties: false |
trigger.kind | string | Yes | Exactly one branch must match: branch 3 Constant value: "cron" |
trigger.spec | object | Yes | Exactly one branch must match: branch 3 Additional properties: true |
trigger.spec.expr | string | Yes | Exactly one branch must match: branch 3 Five-field Cron expression |
trigger.spec.rest_day | object | No | Exactly one branch must match: branch 3 Additional properties: true |
trigger.spec.rest_day.enabled | boolean | No | Exactly one branch must match: branch 3 — |
trigger.spec.rest_day.region | string | No | Exactly one branch must match: branch 3 — |
trigger.spec.rest_day.skip_on | string | No | Exactly one branch must match: branch 3 Allowed values: ["WORKDAY", "HOLIDAY"] |
trigger.spec.tz | string | Yes | Exactly one branch must match: branch 3 IANA time zone, such as Asia/Shanghai |
type | string | Yes | Constant value: "time" |
updated_at | string | Yes | Format: "date-time" |
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.pause Scope, or the task does not belong to the current user. |
404 | The task does not exist or has been deleted. |
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