Query runtime task events

Query the events recorded by a runtime task.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-runtime-tasks/{task_id}/events

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.

Request parameters

Replace $WORKSPACE_ID, $TASK_ID, $CLOUDSIGMA_API_KEY in the example with actual values.

Shell
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-runtime-tasks/$TASK_ID/events" -H "X-API-Key: $CLOUDSIGMA_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"

Parameter

Type

Required

Description

workspace_id

string

Yes

The workspace ID to which it belongs.

task_id

string

Yes

Task ID.

Query parameters

Parameter

Type

Required

Description

agent_id

string

No

agent ID.

agent_workspace_id

string

No

Current workspace or system. When omitted, the agent source is not limited.

after_seq

integer

No

Only events with sequence numbers greater than this value are returned. Negative numbers are handled as 0.

When agent_id or agent_workspace_id is omitted, the agent source is not limited according to the corresponding conditions. When filling in agent_workspace_id, only the current workspace or system is accepted, and null values ​​cannot be passed.

When a parameter with the same name is submitted repeatedly, this interface reads the first value.

Successful response

JSON
{
  "code": 0,
  "data": {
    "items": [],
    "total": 0,
    "after_seq": 0
  }
}

Field

Type

Description

data.items

array of object

Task events that meet the cursor conditions.

data.items[].id

string

logo.

data.items[].workspace_id

string

The workspace ID to which it belongs.

data.items[].task_id

string

Task ID.

data.items[].seq

integer

Event sequence number. after_seq for next request.

data.items[].kind

string

Event type. Values: lifecycle, error, text_delta, tool_call, tool_result, artifact, audit, a2ui, interaction.

data.items[].a2a_state

string

A2A task status. Values: submitted, working, input-required, auth-required, completed, failed, canceled, rejected.

data.items[].payload

object

content.

data.items[].visible

boolean

visible or not.

data.items[].created_at

string

Creation time. RFC 3339 time.

data.total

integer

The number of events returned this time.

data.after_seq

integer

The event cursor used for this request.

Error response

When the target does not exist or does not match the specified agent source, HTTP 404 is returned and the error code is 3. Permission denied returns HTTP 403 with error code 5. The error envelope of the identity authentication layer is different from the business error envelope of this interface.

JSON
{
  "code": 3,
  "message": "task not found"
}

Field

Type

Description

code

integer

error code.

message

string

Error message for the caller.

Last updated on