This API is used to query the last O&M task of an agent.
Call description
Request path
GET /api/v1/task/dag/maintain/agent
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | Boolean | Indicates whether the request is successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. |
| data | Object | For more information, see GetDagDetails. |
| error | Object | The information about the error that occurred. |
Examples
Sample request
GET xxx.xxxx.xxx.xxx:2886/api/v1/task/dag/maintain/agent
Sample response
{
"successful": true,
"timestamp": "2024-01-09T21:45:27.340233605+08:00",
"duration": 0,
"status": 200,
"traceId": "4ceda0238c6e5298",
"data": {
"id": "22130706433028869",
"dag_id": 4,
"name": "Synchronize agent from cluster",
"stage": 1,
"max_stage": 1,
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:01:31.650764119+08:00",
"end_time": "2024-01-09T20:01:32.655874093+08:00",
"additional_data": null,
"nodes": [
{
"id": "22130706433028869",
"node_id": 5,
"name": "Synchronize agent from cluster",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:01:31.651926606+08:00",
"end_time": "2024-01-09T20:01:32.655194254+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "22130706433028869",
"task_id": 5,
"name": "Synchronize agent from cluster",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:01:31.653629561+08:00",
"end_time": "2024-01-09T20:01:31.795492693+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.xxx.xxx",
"port": 2886
},
"task_logs": [
"try to connect",
"connect succeed, dump password",
"synchronize agent from oceanbase",
"sync agent data"
]
}
]
}
]
}
}
The sample response displays the details of a task named Synchronize agent from cluster. The operation type is RUN, and the execution result is SUCCEED.