Query runtime task events¶
Query the events recorded by a runtime task.
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.
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 |
|---|---|---|---|
|
string |
Yes |
The workspace ID to which it belongs. |
|
string |
Yes |
Task ID. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
agent ID. |
|
string |
No |
Current workspace or system. When omitted, the agent source is not limited. |
|
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¶
{
"code": 0,
"data": {
"items": [],
"total": 0,
"after_seq": 0
}
}
Field |
Type |
Description |
|---|---|---|
|
array of object |
Task events that meet the cursor conditions. |
|
string |
logo. |
|
string |
The workspace ID to which it belongs. |
|
string |
Task ID. |
|
integer |
Event sequence number. after_seq for next request. |
|
string |
Event type. Values: |
|
string |
A2A task status. Values: |
|
object |
content. |
|
boolean |
visible or not. |
|
string |
Creation time. RFC 3339 time. |
|
integer |
The number of events returned this time. |
|
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.
{
"code": 3,
"message": "task not found"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error message for the caller. |