Call requirements, permissions, request fields, response fields, and error handling.
Request and permissions
GET https://openapi.qwenwork.ai/v1/session/sessions/{session_id}/output
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:
Session-level output: files in the output directory, pages it has published, and a live view of what it is running.
This is session-level, not turn-level. Files the agent presented during a turn are listed in items from GET /sessions/{session_id}/turns/{turn_id}.
Field lifetimes
| Field | Lifetime |
|---|---|
files[] | Outlives the session; path is stable, download URLs are not |
page | Outlives the session; page.url is a persistent address |
live | Short-lived; read again whenever you need the view |
live.url can expire without notice. Request it again the next time you need the view rather than storing it.
live.available: true requires both a reachable view and a viewable application provided by this session. A session that only produced files reports available: false with reason: nothing_to_preview, because there is nothing to view live; its output is in files and page.
live.kind identifies the type of view at live.url. Currently, the only emitted type is web_app—a page served by this session. This is an open enum: treat unrecognized values as opaque embeddable views, not errors.
live.available: false is returned with 200, not an error status. live.reason specifies the situation: starting, nothing_to_preview, preview_released, or session_ended. A terminated session reports available: false, while its files and page remain valid.
Files have no turn_id: they are collected asynchronously and cannot be attributed to a specific turn.
degraded lists the sections that could not be read for this request, such as ["files"] when object storage is unreachable. Other sections are returned normally.
cursor and limit paginate only files. page and live are single values returned in full on every page.
Remote-control sessions: This operation returns 422 OPERATION_NOT_SUPPORTED without contacting the 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
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.
Path parameters
| Parameter | Type | Required | Description and constraints |
|---|---|---|---|
session_id | string | Yes | Session identifier: a UUID for cloud sessions; an opaque identifier on the selected device for remote-control sessions. Minimum length: 1 Maximum length: 256 |
Query parameters
| Parameter | Type | Required | Description and constraints |
|---|---|---|---|
cursor | integer | No | Opaque pagination cursor for the file list; omit it for the first page. Opaque pagination cursor for the file list; omit it for the first page. Format: "int64" Minimum (inclusive): 0 |
limit | integer | No | Number of entries per page in the file list. Number of entries per page in the file list. Default: 20 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 | URL of the JSON Schema for this object. Format: "uri" |
degraded | array | Yes | Sections that could not be read in this response, such as ["files"] when object storage is unreachable; otherwise an empty array. This is a partial result rather than a 500. An empty files array with files listed here means the value is unknown, not empty. |
degraded[] | string | No | — |
files | array | Yes | Files in the session's output directory, newest first. An empty array, never null, when no files have been written. These files have no turn attribution. Files explicitly presented by the agent during a turn are listed in that turn's details. |
files[] | object | No | Additional fields: false |
files[].created_at | string | Yes | When storage last observed a change to this entry. ISO 8601, with microseconds and timezone. |
files[].mime_type | string | No | Content type, present only when reported by storage. Absent for directories. |
files[].name | string | Yes | Name without the directory portion—the final segment of path. |
files[].path | string | Yes | Storage path, not a URL. For files, exchange it for a download link when you need the bytes. Presigned URLs expire, so download links are issued on demand rather than listed here. For directories, this is the path to use to list their contents. |
files[].size | integer | No | Size in bytes. Absent or 0 for directories. Format: "int64" |
files[].type | string | Yes | "file" or "directory". A directory is returned as one entry, not expanded—use its path to list its contents. Open enum: treat unrecognized values as opaque entries, not errors. |
has_more | boolean | Yes | true means more files are available. Applies only to files. |
live | object | null | Yes | Live preview of a running application. Always an object, never null: live.available indicates whether a preview exists; otherwise live.reason explains why not. |
live | object | Yes | At least one of: branch 1 Additional fields: false |
live.available | boolean | Yes | At least one of: branch 1 Whether a live view can be displayed now. true requires both a reachable view and a viewable application provided by this session. A session that only produced files reports false because there is nothing to view live. false is a normal state for a healthy session, not an error, so the response is still 200. Read reason when false. |
live.kind | string | No | At least one of: branch 1 The type of view at url. "web_app": a page served by this session. Open enum—treat unrecognized values as opaque embeddable views, not errors; new types may be added. Absent when unavailable. |
live.reason | string | No | At least one of: branch 1 Why no preview is available; present only when available is false. "starting": the preview is still starting. "nothing_to_preview": the session has nothing to display live—it has not provided a viewable application, or the application it provided is no longer being served. Other output is unaffected and appears in files and page in the same response. "preview_released": the live preview has been released and its url is no longer usable, but page may still contain a published page. "session_ended": the session has ended. Open enum. |
live.url | string | No | At least one of: branch 1 Short-lived address. Request this endpoint again when you need a preview rather than storing it—a saved address can expire without notice. |
live | null | Yes | At least one of: branch 2 — |
next_cursor | integer | Yes | Cursor for the next page of files. 0 when there is no next page. Paginates only files—page and live are single values returned in full on every page. Format: "int64" |
page | object | null | Yes | The published page, or null if none has been published. A single value, not a list: each publication allocates a new version, while the URL always points to the latest version. |
page | object | Yes | At least one of: branch 1 Additional fields: false |
page.domain | string | No | At least one of: branch 1 Domain hosting this page. |
page.published_at | string | Yes | At least one of: branch 1 When this version went live. ISO 8601, with microseconds and timezone. |
page.url | string | Yes | At least one of: branch 1 Page address. Persistent—safe to store and share, unlike live preview URLs or presigned file links. Always points to the latest published version. |
page.version | string | No | At least one of: branch 1 The published version currently served at this URL. Publishing again allocates a new version number. |
page | 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