---
title: "获取 Node 的详细信息 - OceanBase 数据库 V4.3.4 | OceanBase 文档中心"
description: "获取 Node 的详细信息 本文档介绍如何获取一个 Node 的详细信息。 调用说明 接口约束 obshell Server 会对该 API 进行安全校验，详细介绍可参见 API 混合加密 。 请求路径 GET /api/v1/task/node/{id} 此处的 id 需配置为 Node 的通用 ID。 返回结果 …"
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*P8CuR4UJ_FkAAAAAAAAAAAAADiGDAQ/original) OceanBase 数据库分布式版 - V 4.3.4

# 获取 Node 的详细信息

更新时间：2024-11-22 23:00:00

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V4.3.4/zh-CN/700.reference/1500.Components-and-Tools/100.manage/100.obshell/400.obshell-api-reference/1000.task-management/2100.get-node-detail.md)  

本文档介绍如何获取一个 Node 的详细信息。

## 调用说明

### 接口约束

obshell Server 会对该 API 进行安全校验，详细介绍可参见 [API 混合加密](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000001576772)。

### 请求路径

GET /api/v1/task/node/{id}

此处的 `id` 需配置为 Node 的通用 ID。

### 返回结果

| 参数 | 类型 | 说明 |
| --- | --- | --- |
| successful | bool | 请求是否成功。 |
| timestamp | time.Time | 服务端完成请求的时间戳。 |
| duration | int | 服务端处理请求的时间（毫秒）。 |
| status | int | 符合 HTTP Status 规范的编码。 |
| traceId | string | 请求的 Trace ID。 |
| data | NodeDetailDTO | 详情参见下文 **NodeDetailDTO 信息的数据结构**。 |
| error | ApiError | 请求产生的 Error，包含如下信息：   - `code`：错误码。 - `message`：错误详细信息。 - `subErrors`：子错误信息。 |

NodeDetailDTO 信息的数据结构如下：

| 参数 | 类型 | 说明 |
| --- | --- | --- |
| id | string | Node 通用 ID |
| node_id | int | Node id，是记录在 OceanBase 数据库中的主键 |
| name | string | Node 名称 |
| state | string | Node 执行状态 |
| operator | string | Node 执行操作类型 |
| start_time | time.Time | Node 执行起始时间 |
| end_time | time.Time | Node 执行结束时间 |
| additional_data | map[string]any | Node 其他数据 |
| sub_tasks | []TaskDetailDTO | Node 内的所有 subTask 信息，详细介绍请参见下文 **TaskDetailDTO 信息的数据结构** |

TaskDetailDTO 信息的数据结构如下：

| 参数 | 类型 | 说明 |
| --- | --- | --- |
| id | string | subTask 通用 ID。 |
| task_id | int | subTask id，是记录在 OceanBase 数据库中的主键。 |
| name | string | subTask 名称。 |
| state | string | subTask 执行状态。 |
| operator | string | subTask 执行操作类型。 |
| start_time | time.Time | subTask 执行起始时间。 |
| end_time | time.Time | subTask 执行结束时间。 |
| additional_data | map[string]any | subTask 其他数据。 |
| execute_times | int | 执行次数。 |
| execute_agent | AgentInfo | 执行节点的 AgentInfo，包含如下信息：   - `ip`：obshell 的 IP。 - `port`：obshell 的端口。 |
| task_logs | []string | 执行日志。 |

## 示例

### 请求示例

GET 10.10.10.1:2886/api/v1/task/node/11

### 返回示例

示例中展示了名为 `Integrate server config` 的 Node 的信息，执行操作为 `RUN`，执行结果为 `SUCCEED`。

```json
{
    "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": "10.10.10.1",
                    "port": 2886
                },
                "task_logs": []
            }
        ]
    }
}

```

## 相关文档

除通过命令行调用 API 接口外，还可以通过 SDK 方法调用 API。

- 通过 obshell-sdk-python 请求 API 方法的介绍可参见 [获取 Node 的详细信息](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000001578517)。
 - 通过 obshell-sdk-go 请求 API 方法的介绍可参见 [获取 Node 的详细信息](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000001578591)。

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
