---
title: github-fill
description: "查询机型详情 功能说明 根据机型 ID 查询主机机房信息。 调用说明 接口约束 调用者需要具备 HOST_VIEWER 权限。 请求路径 GET /api/v2/compute/hostTypes/{hostTypeId} 请求参数 path： 参数 类型 必选 示例值 描述 hostTypeId Integer 是…"
---
切换语言

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

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*lJTmRZ61jSUAAAAAAAAAAAAADiGDAQ/original) 云平台 OCPV 4.3.0

# 查询机型详情

更新时间：2026-04-14 11:55:54

[编辑](https://github.com/oceanbase/ocp-doc/edit/V4.3.0/zh-CN/1900.reference-guide/200.api-reference/600.host-module/1000.query-detailed-information-about-a-model.md)  

## 功能说明

根据机型 ID 查询主机机房信息。

## 调用说明

### 接口约束

调用者需要具备 HOST_VIEWER 权限。

### 请求路径

`GET /api/v2/compute/hostTypes/{hostTypeId}`

### 请求参数

**path：**

| 参数 | 类型 | 必选 | 示例值 | 描述 |
| --- | --- | --- | --- | --- |
| hostTypeId | Integer | 是 | 100 | 机型 ID。 |

### 返回结果

**基础数据结构**

| 参数 | 类型 | 说明 |
| --- | --- | --- |
| data | Object | 请求的数据。 |
| ├─ contents | Array | HostType 的数组，详情参见 **HostType 数据结构**。 |
| ├─ page | Object | 分页信息，详情参见 **page 数据结构**。 |
| successful | Boolean | 请求是否成功。 |
| timestamp | Datetime | 服务端完成请求的时间戳。 |
| duration | Integer | 服务端处理请求的时间（毫秒）。 |
| status | Integer | 符合 HTTP Status 规范的编码。 |
| traceId | String | 请求的 Trace ID，用于排查问题。 |
| server | String | 响应请求的应用服务的地址。 |

**HostType 数据结构**

| 参数 | 类型 | 说明 |
| --- | --- | --- |
| id | Long | 机型 ID。 |
| name | String | 机型名称。 |
| description | String | 机型描述信息。 |
| createTime | String | 机型创建时间。 |
| updateTime | String | 机型修改时间。 |

**page 数据结构**

| 参数 | 类型 | 说明 |
| --- | --- | --- |
| totalElements | Integer | 总记录数。 |
| totalPages | Integer | 总页数。 |
| number | Integer | 当前页码。 |
| size | Integer | 当前页大小。 |

## 示例

### 请求示例

`GET /api/v2/compute/hostTypes/100`

### 返回示例

```json
{
  "data": {
    "contents": [
      {
        "createTime": "2024-12-31T18:01:34+08:00",
        "description": null,
        "id": 1,
        "name": "ECS_8C64G",
        "updateTime": "2024-12-31T18:01:34+08:00"
      }
    ],
    "page": {
      "number": 1,
      "size": 5000,
      "totalElements": 1,
      "totalPages": 1
    }
  },
  "duration": 5823,
  "server": "b3b6d90167",
  "status": 200,
  "successful": true,
  "timestamp": "2025-04-27T11:01:59.503+08:00",
  "traceId": "4ebe74db34f22716"
}

```

 上一篇 下一篇 ![有帮助](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) 咨询热线
