Query automation task details¶
Read the current configuration and execution summary of an automated task.
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/agent-automation-tasks/{automation_task_id}
Preparation before calling¶
First query the automation task list to obtain the task ID. Prepare a personal access token and target workspace ID that has access to the target workspace.
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.$TASK_ID: The automation task ID to query, asautomation_task_idin the path.
Request example¶
curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/agent-automation-tasks/$TASK_ID" \
-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 |
Automation task ID. |
Successful response¶
Returns 200 on success. The plan trigger can return next_trigger_at when calculating the next execution; last_run_summary can be returned when there are already execution records.
{
"code": 0,
"data": {
"id": "task_01",
"workspace_id": "ws_01",
"agent_workspace_id": "ws_01",
"name": "每日摘要",
"agent_id": "agent_01",
"instruction_text": "汇总当天的输入内容。",
"trigger": {
"mode": "cron",
"cron_expression": "0 9 * * *"
},
"status": "active",
"version": 1,
"created_at": "2026-08-18T01:00:00Z",
"updated_at": "2026-08-18T01:00:00Z"
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
string |
Task, workspace and target agent identification. |
|
string |
Task, workspace and target agent identification. |
|
string |
Task, workspace and target agent identification. |
|
string |
Task, workspace and target agent identification. |
|
string |
Task name, description and fixed instructions. |
|
string |
Task name, description and fixed instructions. |
|
string |
Task name, description and fixed instructions. |
|
object |
Trigger configuration; contains |
|
object |
Authentication policy and structured output constraints; not returned if not set. |
|
object |
Authentication policy and structured output constraints; not returned if not set. |
|
string |
Task status and current version. |
|
integer |
Task status and current version. |
|
string |
Next scheduled trigger time; returned when computable, using RFC 3339 format. |
|
object |
Summary of the latest run; can be returned if a run record exists. |
|
object |
Task execution plan. |
|
string |
Creation and last update times, using RFC 3339 format. |
|
string |
Creation and last update times, using RFC 3339 format. |
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 task IDs. |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The current identity cannot read the agent associated with the task. |
Check workspace and agent authorizations. |
|
|
The automated task does not exist. |
Check the task list first. |
|
|
Automation task services or agent summary projection dependencies are not available. |
Try again later. |
Follow-up operations¶
Update automated tasks according to the current configuration, or start a task and query the corresponding running details.