Call requirements, permissions, request fields, response fields, and error handling.
Request and permissions
GET https://openapi.qwenwork.ai/v1/session/sessions
Authentication: Authorization: Bearer <access_token>; use an access token obtained through user OAuth authorization.
Required business Scope: session.session.read
Authorization methods declared by the contract: Organization authorization (organization), personal authorization (personal)
The platform must enable the Scope for the application. The user must have the corresponding business permissions, and the target resource must be within their accessible scope. Whether personal or organization authorization is available to the application depends on the actual console configuration.
Behavior and limitations
Omitting session_type selects a cloud session. Every remote-control request must use session_type=remote and provide a nonempty device_id. Providing device_id for a cloud session, an empty or unknown type, or duplicate target parameters returns 422 VALIDATION_ERROR. Cross-device aggregated lists and automatic fallback to cloud are not provided. Both types use the same authentication chain; the open platform validates the corresponding Scope declared by each endpoint.
Cloud sessions:
Cursor-based pagination. Pass the returned next_cursor to the next call; stop when has_more is false.
updated_since (RFC3339) limits results to sessions whose records changed after that instant.
status can filter by starting, idle, running, action_required, or terminated. Filtering by action_required returns sessions waiting for an answer.
List rows contain SessionSummary fields. Obtain pending_action and children from GET /sessions/{session_id}.
Remote-control sessions:
Shares public gateway authentication with cloud sessions; this endpoint requires the business Scope stated below. No controller device ID or pairing is required. The target remote-control master switch must be enabled. If explicitly disabled, returns 403 FORBIDDEN with detail.reason=ACP_HOST_DISABLED; rejected write requests return detail.acceptance=not_accepted. An explicitly nonexistent session returns 404 NOT_FOUND with detail.reason=SESSION_NOT_FOUND. Commands route only to target connections signed in to the currently authenticated account. Offline targets, unknown targets, and targets belonging to other accounts all return device unavailable. Unknown request body fields are rejected. Returns bounded pagination without a total count. Opaque cursors are bound to the authenticated account and target device.
Call through the open platform, retaining the existing oauth_app Token, identity resolution, application IP restrictions, and resource ownership checks. Cloud and remote-control parameters retain their actual contract semantics.
Short paths such as /sessions in this page are relative to the common prefix /v1/session. Use the full path at the top of this page for actual requests.
Supported session types: cloud, remote
In the full JSON, x-session-variants preserves the parameters, request bodies, and responses for cloud and remote-control sessions separately. Do not mix fields from the two branches.
Query parameters
| Parameter | Type | Required | Description and constraints |
|---|---|---|---|
status | string | No | Return only sessions with this status. Filter by action_required for sessions waiting for an answer. Supported only for cloud sessions; passing this parameter for remote control returns 422. Return only sessions with this status. Filter by action_required for sessions waiting for an answer. Allowed values: ["starting", "idle", "running", "action_required", "terminated"] |
updated_since | string | No | RFC3339 timestamp. Return only sessions whose records changed after that instant. Supported only for cloud sessions; passing this parameter for remote control returns 422. RFC3339 timestamp. Return only sessions whose records changed after that instant. |
cursor | string | No | Opaque pagination cursor. Omit for the first page. Remote-control sessions: an opaque string cursor bound to the account and device. Pass unchanged as a string in HTTP parameters: a decimal sequence number for cloud sessions, an opaque cursor for remote control. The service validates it according to session type. Maximum length: 8192 |
limit | integer | No | Page size. Cloud: default 20, range 1 to 100. Remote control: default 50, range 1 to 100. Number of entries per page. Format: "int64" Minimum (inclusive): 1 Maximum (inclusive): 100 |
session_type | string | No | Omitting session_type selects a cloud session. Every remote-control request must use session_type=remote and provide a nonempty device_id. Providing device_id for a cloud session, an empty or unknown type, or duplicate target parameters returns 422 VALIDATION_ERROR. Cross-device aggregated lists and automatic fallback to cloud are not provided. Both types use the same authentication chain; the open platform validates the corresponding Scope declared by each endpoint. Default: "cloud" Allowed values: ["cloud", "remote"] |
device_id | string | No | Required only for remote control. An opaque target device identifier from device discovery; it must be URL-encoded. The target connection must be signed in to the currently authenticated account. Minimum length: 1 Maximum length: 256 |
Request body
The public contract declares no request body. Do not add identity fields or undeclared business fields.
Successful responses
Preserve the original response structure of each business endpoint; do not add a common code/msg/data wrapper.
HTTP 200
Success
Response type: application/json
| Field | Type | Required | Description and constraints |
|---|---|---|---|
$schema | string | No | At least one of: branch 1 URL of the JSON Schema for this object. Format: "uri" |
has_more | boolean | Yes | At least one of: branch 1 true means another page exists. This is the authoritative signal for whether to keep paginating—a full page alone does not mean more data exists. |
items | array | Yes | At least one of: branch 1 One row per session, newest first. An empty array, never null, when no sessions exist. |
items[] | object | No | At least one of: branch 1 Additional fields: false |
items[].client | string | No | At least one of: branch 1 Immutable creation source; later prompts do not change it. |
items[].created_at | string | Yes | At least one of: branch 1 When the session was created. ISO 8601, with microseconds and timezone. |
items[].end_reason | string | null | Yes | At least one of: branch 1 Why it ended, or null if it has not ended. Populated only when status is terminated. |
items[].extra_data | object | No | At least one of: branch 1 Public creation metadata. An opaque creation context string is not inherited by later prompts. |
items[].mode | string | Yes | At least one of: branch 1 The capability tier this session runs on. |
items[].name | string | Yes | At least one of: branch 1 Display name. |
items[].operation_control | object | null | No | At least one of: branch 1 — |
items[].operation_control | object | No | At least one of: branch 1 At least one of: branch 1 Additional fields: false |
items[].operation_control.owner_type | string | Yes | At least one of: branch 1 At least one of: branch 1 Allowed values: ["personal_assistant", "user"] |
items[].operation_control.release_at | string | null | No | At least one of: branch 1 At least one of: branch 1 — |
items[].operation_control.revision | string | Yes | At least one of: branch 1 At least one of: branch 1 — |
items[].operation_control.session_status | string | Yes | At least one of: branch 1 At least one of: branch 1 — |
items[].operation_control | null | No | At least one of: branch 1 At least one of: branch 2 — |
items[].session_id | string | Yes | At least one of: branch 1 Session id. Use GET /sessions/{session_id} for full details. |
items[].session_type | string | Yes | At least one of: branch 1 Allowed values: ["cloud"] |
items[].status | string | Yes | At least one of: branch 1 Current status. Filter the list with ?status=action_required to return sessions in that state. |
items[].updated_at | string | Yes | At least one of: branch 1 When the session record last changed. ISO 8601. |
next_cursor | integer | Yes | At least one of: branch 1 Pass back as ?cursor= to get the next page. 0 means no next page. Always check has_more rather than whether this value is 0. Format: "int64" |
$schema | string | No | At least one of: branch 2 URL of the JSON Schema for this object. Format: "uri" |
has_more | boolean | Yes | At least one of: branch 2 — |
items | array | Yes | At least one of: branch 2 — |
items[] | object | No | At least one of: branch 2 Additional fields: false |
items[].client | string | No | At least one of: branch 2 Immutable creation source; later prompts do not change it. |
items[].created_at | string | Yes | At least one of: branch 2 — |
items[].device_id | string | Yes | At least one of: branch 2 — |
items[].extra_data | object | No | At least one of: branch 2 Display-compatibility metadata confirmed as saved by the target desktop. Absent if the marker was not saved. Additional fields: false |
items[].extra_data.eva_audio_stream | object | No | At least one of: branch 2 Pass {} to set the EVA voice display-compatibility marker for the session. QwenWork hides background_hint blocks in requests and tts_summary blocks in responses. Omit for normal session display. Only an empty object is accepted, not null. Additional fields: false |
items[].mode | string | null | Yes | At least one of: branch 2 — |
items[].name | string | null | Yes | At least one of: branch 2 — |
items[].operation_control | object | null | No | At least one of: branch 2 — |
items[].operation_control | object | No | At least one of: branch 2 At least one of: branch 1 Additional fields: false |
items[].operation_control.owner_type | string | Yes | At least one of: branch 2 At least one of: branch 1 Allowed values: ["personal_assistant", "user"] |
items[].operation_control.release_at | string | null | No | At least one of: branch 2 At least one of: branch 1 — |
items[].operation_control.revision | string | Yes | At least one of: branch 2 At least one of: branch 1 — |
items[].operation_control.session_status | string | Yes | At least one of: branch 2 At least one of: branch 1 — |
items[].operation_control | null | No | At least one of: branch 2 At least one of: branch 2 — |
items[].session_id | string | Yes | At least one of: branch 2 — |
items[].session_type | string | Yes | At least one of: branch 2 Allowed values: ["remote"] |
items[].status | string | Yes | At least one of: branch 2 Desktop running state. An open set; callers must tolerate unknown values. |
items[].updated_at | string | Yes | At least one of: branch 2 — |
next_cursor | string | null | Yes | At least one of: branch 2 — |
Error responses
| HTTP | Description and handling |
|---|---|
default | Error. Branch on code, not just the HTTP status code—multiple conditions can share the same status code. |
Full field contract
The JSON below contains the complete request, response, and error schemas, nested constraints, and public extension definitions for this endpoint. Copy it for verification. Success examples not declared in the contract are not inferred.
Full OpenAPI JSON
Full OpenAPI JSON