Query automation task running events¶
Query the life cycle events of an automated task running record.
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/agent-automation-runs/{run_id}/events
Preparation before calling¶
Prepare to run the record ID, personal access token with access to the target workspace, and the target workspace ID.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed through theX-Workspace-IDHeader and also asworkspace_idin the path.$RUN_ID: To query the running record ID of the event, use it asrun_idin the path.
Request example¶
curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/agent-automation-runs/$RUN_ID/events?limit=50&offset=0" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
Workspace ID. |
|
string |
Yes |
Run record ID. |
Query parameters¶
When limit or offset is not provided, the service returns 50 records by default and starts from record 0; the maximum value for limit is 200.
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
integer |
No |
Return the quantity. |
|
integer |
No |
Returns the starting position of the list. |
Successful response¶
Returns 200 on success. data.items is the event list, data.total is the total number of matches.
{
"code": 0,
"data": {
"items": [
{
"id": "event_01",
"workspace_id": "ws_01",
"run_id": "run_01",
"automation_task_id": "task_01",
"type": "status_changed",
"status": "running",
"message": "运行已开始。",
"created_at": "2026-08-18T04:00:00Z"
}
],
"total": 1,
"limit": 50,
"offset": 0
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
array |
Run life cycle events. |
|
string |
Event, workspace, run, and task identifiers. |
|
string |
Event, workspace, run, and task identifiers. |
|
string |
Event, workspace, run, and task identifiers. |
|
string |
Event, workspace, run, and task identifiers. |
|
string |
Event type, optional status, and description. |
|
string |
Event type, optional status, and description. |
|
string |
Event type, optional status, and description. |
|
string |
Event creation time, using RFC 3339 format. |
|
integer |
Total number of matches, current page size, and offset. |
|
integer |
Total number of matches, current page size, and offset. |
|
integer |
Total number of matches, current page size, and offset. |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Error response¶
{
"code": 3,
"message": "<错误信息>"
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The path parameter is invalid. |
Check workspace and run ID. |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The running record does not exist. |
Query the running list first. |
|
|
The automated task service is unavailable. |
Try again later. |
Follow-up operations¶
The status in the event is used to assist diagnosis; for the final output, please Query the results of automated task execution.