OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Cloud Platform

V4.3.4

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Cloud Platform
    3. V4.3.4
    iconOceanBase Cloud Platform
    V 4.3.4
    • V 4.3.6
    • V 4.3.5
    • V 4.3.4
    • V 4.3.3
    • V 4.3.2
    • V 4.3.1
    • V 4.3.0
    • V 4.2.2
    • V 4.0.0 and earlier

    Query hosts

    Last Updated:2026-04-14 06:46:03  Updated
    share
    What is on this page
    Description
    Call description
    Prerequisite
    Request path
    Request parameters
    Response parameters
    Examples
    Sample request
    Sample response

    folded

    share

    Description

    You can call this operation to query hosts.

    Call description

    Prerequisite

    You have the HOST_VIEWER permissions.

    Request path

    GET /api/v2/compute/hosts

    Request parameters

    Parameter Type Required Example value Description
    status StringArray No ONLINE,NEW The status of the host. Valid values: * NEW: The host is newly added without OCP-Agent and has not been initialized. * AVAILABLE: The host is online and available. * ONLINE: The host is online and the OCP-Agent service has been deployed on it. * OFFLINE: The host is offline. * DELETING
    keyword String No cluster1 The keyword for searching for a host. Fuzzy match is supported. Valid values: * hostname: the name of the host. * innerIpAddress: the IP address of the host. * service: the service deployed on the host.
    includedServiceType StringArray No OB_CLUSTER,OB_PROXY The service types included in the query. Valid values: * OB_CLUSTER * OB_PROXY * OCP_AGENT * BACKUP_AGENT * RESTORE_AGENT * BACKUP_RESTORE_AGENT * OMS
    excludedServiceType StringArray No OB_CLUSTER,OB_PROXY The service types excluded in the query. Valid values: * OB_CLUSTER * OB_PROXY * OCP_AGENT * BACKUP_AGENT * RESTORE_AGENT * BACKUP_RESTORE_AGENT * OMS
    page Integer No 1 The number of the page to return. Pages start from page 1.
    size Integer No 10 The number of entries to return on each page. Maximum value: 2000.
    sort String No id,asc The rule for sorting the requested data.

    Response parameters

    Parameter Type Description
    data Object The requested data.
    ├─ contents Array The array of hosts. For more information about the data structure, see the following table.
    ├─ page Object The page information.
    successful Boolean Indicates whether the request was successful.
    timestamp Datetime The timestamp when the server completed the request.
    duration Integer The time taken by the server to process the request, in milliseconds.
    status Integer An HTTP status code.
    traceId String The trace ID of the request. This trace ID is used for troubleshooting.
    server String The address of the application server that responded to the request.

    Page parameters

    Parameter Type Description
    totalElements Integer The total number of entries.
    totalPage Integer The total number of pages.
    number Integer The page number of the returned page.
    size Integer The number of entries returned per page.

    Data structure of the host information

    Parameter Type Description
    id Long The ID of the host.
    name String The name of the host.
    alias String The alias of the host.
    description String The description of the host.
    operatingSystem String The operating system.
    operatingSystemRelease String The release name of the operating system.
    architecture String The hardware architecture.
    serialNumber String The serial number.
    innerIpAddress String The IP address of the host.
    sshPort Integer The SSH port number.
    kind String The host category. Valid values:
  • DEDICATED_PHYSICAL_MACHINE: indicates a physical machine.
  • DEDICATED_CONTAINER: indicates a container.
  • DEDICATED_ECS: indicates a ECS.
  • publishPorts String The port mapping.
    services ObjectArray The ServiceSummary array, which is a summary of the deployed services.
    status String The status of the host. Valid values: * NEW: The host is newly added without OCP-Agent and has not been initialized. * AVAILABLE: The host is online and available. * ONLINE: The host is online and the OCP-Agent service has been deployed on it. * OFFLINE: The host is offline. * DELETING
    idcId Long The ID of the IDC.
    idcName String The name of the IDC.
    idcDescription String The description of the IDC.
    typeId Long The ID of the host type.
    typeName String The name of the host type.
    typeDescription String The description of the host type.
    regionId Long The ID of the region.
    regionName String The name of the region.
    regionDescription String The description of the region.
    hostAgentId Long The ID of the OCP-Agent.
    hostAgentVersion String The version of the OCP-Agent.
    hostAgentStatus String The status of the OCP-Agent. Valid values: * AVAILABLE * RESTARTING * STOPPING * REINTSTALLING * OFFLINE * DELETED
    createTime String The time when the host was created.
    updateTime String The time when the host was modified.

    Data structure of ServiceSummary

    Parameter Type Description
    name String The name of the service.
    version String The version of the service.
    type String The type of the service. Valid values: * OB_CLUSTER * OB_PROXY * OCP_AGENT * BACKUP_AGENT * RESTORE_AGENT * BACKUP_RESTORE_AGENT * OMS
    softwarePackageId Long The ID of the software package.

    Examples

    Sample request

    GET /api/v2/compute/hosts?page=1&size=10

    Sample response

    {
      "data": {
        "contents": [
          {
            "alias": null,
            "architecture": "x86_64",
            "createTime": "2021-08-10T11:56:16+08:00",
            "description": null,
            "hostAgentId": 6000001,
            "hostAgentStatus": "AVAILABLE",
            "hostAgentVersion": "3.1.2-20210812221645",
            "id": 3000002,
            "idcDescription": null,
            "idcId": 1,
            "idcName": "bejing1",
            "innerIpAddress": "xx.xx.xx.xx",
            "kind": "DEDICATED_PHYSICAL_MACHINE",
            "name": "OceanBase152105.et15sqa",
            "operatingSystem": "4.9.168-018.ali3000.alios7.x86_64",
            "operatingSystemRelease": "alios7",
            "publishPorts": null,
            "regionDescription": null,
            "regionId": 1,
            "regionName": "beijing",
            "serialNumber": null,
            "services": [
              {
                "name": "cluster01:1",
                "softwarePackageId": null,
                "type": "OB_CLUSTER",
                "version": "2.2.76"
              }
            ],
            "sshPort": 22,
            "status": "ONLINE",
            "typeDescription": null,
            "typeId": 1,
            "typeName": "beijing",
            "updateTime": "2021-08-25T15:09:53+08:00"
          }
        ],
        "page": {
          "number": 1,
          "size": 10,
          "totalElements": 1,
          "totalPages": 1
        }
      },
      "duration": 31,
      "server": "a83ad33525",
      "status": 200,
      "successful": true,
      "timestamp": "2021-08-25T17:19:47.311+08:00",
      "traceId": "7afbe6e4d7ad403b"
    }
    

    Previous topic

    Delete a host type
    Last

    Next topic

    Query details about a host
    Next
    What is on this page
    Description
    Call description
    Prerequisite
    Request path
    Request parameters
    Response parameters
    Examples
    Sample request
    Sample response