Query session list

Query the visible sessions in the workspace. It can be filtered by agent, status, purpose or top status, and can be read in segments through paging parameters.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/conversations

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare a personal access token and target workspace ID that can access the target workspace. If you need to filter by agent, first obtain the agent ID.

Request body

Shell
curl --get "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/conversations" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --data-urlencode "agent_id=$AGENT_ID" \
  --data-urlencode "status=active" \
  --data-urlencode "limit=20" \
  --data-urlencode "offset=0"

Path parameters

Field

Type

Required

Description

workspace_id

string

Yes

The current workspace ID must be consistent with X-Workspace-ID.

Query parameters

Field

Type

Required

Description

agent_id

string

No

Only sessions for the specified agent are returned.

agent_workspace_id

string

No

The workspace ID to which the agent belongs. If this parameter is not provided when agent_id is specified, the current workspace will be used. Only the current workspace or system workspace can be specified.

status

string

No

Filter by session status.

purpose

string

No

Filter by session purpose, which can be chat, workflow, or agent_authoring.

pinned

boolean

No

When true or 1 only pinned conversations are returned. Filters unpinned conversations for other values.

visibility

string

No

Only visible is accepted. If not provided only visible sessions are returned.

parent_conversation_id

string

No

Filter by parent session ID.

limit

integer

No

Single return quantity. When it is not provided or is less than or equal to 0, it is 50, and the maximum is 200.

offset

integer

No

Returns the offset. 0 when not provided or less than 0.

Purpose also accepts agent_authoring. The system agent conditions for workflow purposes apply individually, and it cannot be inferred from the purpose name that all agents can be used for creation.

Successful response

JSON
{
  "code": 0,
  "data": {
    "items": [
      {
        "id": "conv_01",
        "workspace_id": "ws_01",
        "agent_workspace_id": "ws_01",
        "agent_id": "agent_01",
        "agent_summary": {
          "id": "agent_01",
          "display_name": "销售分析助手",
          "available": true
        },
        "title": "销售分析",
        "status": "active",
        "purpose": "chat",
        "visibility": "visible",
        "pinned": false,
        "created_at": "2026-01-02T15:04:05Z",
        "updated_at": "2026-01-02T15:04:05Z",
        "title_user_edited": false
      }
    ],
    "total": 1,
    "limit": 20,
    "offset": 0
  }
}

Field

Type

Description

code

integer

success code.

data

object

The data returned by this operation.

data.items

array of object

List of conversations on this page.

data.items[].id

string

Session ID.

data.items[].workspace_id

string

The workspace ID to which the session belongs.

data.items[].agent_workspace_id

string

The workspace ID to which the agent belongs.

data.items[].agent_id

string

agent ID.

data.items[].agent_summary

object

agent displays summary.

data.items[].agent_summary.id

string

ID of the current object.

data.items[].agent_summary.workspace_id

string

The workspace ID to which it belongs.

data.items[].agent_summary.display_name

string

Display name.

data.items[].agent_summary.avatar_ref

string

Avatar Quotes.

data.items[].agent_summary.status

string

status.

data.items[].agent_summary.available

boolean

is available.

data.items[].agent_summary.unavailable_reason

string

Reason for unavailability.

data.items[].title

string

Title text.

data.items[].title_user_edited

boolean

Whether the title is editable by the user.

data.items[].status

string

session state. The values are active, archived

data.items[].purpose

string

Conversational purposes. The values are chat, agent_authoring, workflow

data.items[].visibility

string

Session visibility. The values are visible, hidden

data.items[].parent_conversation_id

string

Association ID.

data.items[].pinned

boolean

Whether to pin it to the top.

data.items[].head_message_id

string

Recent message ID. Does not return when there is no message.

data.items[].active_task_id

string

The currently active task ID. Does not return when there are no active tasks.

data.items[].latest_task_id

string

Recent task ID.

data.items[].latest_task_state

string

Most recent task status: submitted, queued, working, input_required, auth_required, completed, failed, canceled, rejected, cancel_requested, reconciling.

data.items[].last_message_at

string

Last message time. Does not return when there is no message. In RFC 3339 format.

data.items[].created_at

string

Creation and last update times, in RFC 3339 format.

data.items[].updated_at

string

Creation and last update times, in RFC 3339 format.

data.total

integer

The total number of sessions matching the filter criteria.

data.limit

integer

The upper limit of return quantity actually adopted this time.

data.offset

integer

The actual offset used this time.

Error response

JSON
{
  "code": 2,
  "message": "请求参数无效",
  "details": {
    "cause": "invalid runtime conversation"
  }
}

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

400

2

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

6

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

403

5

The current identity or active role does not have permission for this operation.

Use an authorized identity or contact an administrator to grant access.

404

3

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

500

1

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

503

15

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on