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.
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¶
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 |
|---|---|---|---|
|
string |
Yes |
The current workspace ID must be consistent with X-Workspace-ID. |
Query parameters
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Only sessions for the specified agent are returned. |
|
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. |
|
string |
No |
Filter by session status. |
|
string |
No |
Filter by session purpose, which can be chat, workflow, or agent_authoring. |
|
boolean |
No |
When true or 1 only pinned conversations are returned. Filters unpinned conversations for other values. |
|
string |
No |
Only visible is accepted. If not provided only visible sessions are returned. |
|
string |
No |
Filter by parent session ID. |
|
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. |
|
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¶
{
"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 |
|---|---|---|
|
integer |
success code. |
|
object |
The data returned by this operation. |
|
array of object |
List of conversations on this page. |
|
string |
Session ID. |
|
string |
The workspace ID to which the session belongs. |
|
string |
The workspace ID to which the agent belongs. |
|
string |
agent ID. |
|
object |
agent displays summary. |
|
string |
ID of the current object. |
|
string |
The workspace ID to which it belongs. |
|
string |
Display name. |
|
string |
Avatar Quotes. |
|
string |
status. |
|
boolean |
is available. |
|
string |
Reason for unavailability. |
|
string |
Title text. |
|
boolean |
Whether the title is editable by the user. |
|
string |
session state. The values are |
|
string |
Conversational purposes. The values are |
|
string |
Session visibility. The values are |
|
string |
Association ID. |
|
boolean |
Whether to pin it to the top. |
|
string |
Recent message ID. Does not return when there is no message. |
|
string |
The currently active task ID. Does not return when there are no active tasks. |
|
string |
Recent task ID. |
|
string |
Most recent task status: |
|
string |
Last message time. Does not return when there is no message. In RFC 3339 format. |
|
string |
Creation and last update times, in RFC 3339 format. |
|
string |
Creation and last update times, in RFC 3339 format. |
|
integer |
The total number of sessions matching the filter criteria. |
|
integer |
The upper limit of return quantity actually adopted this time. |
|
integer |
The actual offset used this time. |
Error response¶
{
"code": 2,
"message": "请求参数无效",
"details": {
"cause": "invalid runtime conversation"
}
}
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
400 |
|
Invalid request field, workspace, or operation precondition. |
Fix the request parameters and submit again. |
401 |
|
Missing or invalid authentication credentials. |
Check the credential type, expiration, and authentication header. |
403 |
|
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 |
|
The target object or required reference was not found. |
Verify the object identifier, workspace, and current status. |
500 |
|
Internal processing failed; write operations may have been partially applied. |
Retain request and trace details, and verify the current state before retrying. |
503 |
|
A business, runtime, or authorization dependency is temporarily unavailable. |
After the dependency recovers, check existing results first instead of blindly repeating writes. |