This API is used to obtain the detailed information of a node.
Call description
Request path
GET /api/v1/task/node/{id}
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 the data structure of NodeDetailDTO. |
| error | Object | The information about the error that occurred. |
The following table describes the data structure of NodeDetailDTO.
| Parameter | Type | Description |
|---|---|---|
| id | String | The general ID of the node. |
| node_id | Integer | The ID of the node. |
| name | String | The name of the node. |
| state | String | The execution status of the node. |
| operator | String | The operation type of the node. |
| start_time | Time | The time when the execution of the node started. |
| end_time | Time | The time when the execution of the node ended. |
| additional_data | map[string]Any | Other data of the node. |
| sub_tasks | []TaskDetailDTO | The information of all subtasks in the node. For information about how to obtain the information, see GetSubtaskDetails. |
Examples
Sample request
GET xxx.xxx.x.x:2886/api/v1/node/11
Sample response
{
"successful": true,
"timestamp": "2024-01-09T21:18:19.721587522+08:00",
"duration": 10,
"status": 200,
"traceId": "cd6c87efd848bb02",
"data": {
"id": "11",
"node_id": 1,
"name": "Integrate server config",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:01.718882+08:00",
"end_time": "2024-01-09T20:40:02.751743+08:00",
"additional_data": null,
"sub_tasks": [
{
"id": "11",
"task_id": 1,
"name": "Integrate server config",
"state": "SUCCEED",
"operator": "RUN",
"start_time": "2024-01-09T20:40:01.74723+08:00",
"end_time": "2024-01-09T20:40:01.76717+08:00",
"additional_data": null,
"execute_times": 1,
"execute_agent": {
"ip": "xxx.xxx.x.x",
"port": 2886
},
"task_logs": []
}
]
}
}
The sample response displays the details of a node named Integrate server config. The operation type is RUN, and the execution result is SUCCEED.