OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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 & CertificationTicket
    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

    API call description

    Last Updated:2026-04-14 06:46:03  Updated
    share
    What is on this page
    Request structure
    Request URI
    Request method
    Request header
    Request body
    Authentication description
    Response structure
    Call example
    cURL
    Internationalization
    Throttling

    folded

    share

    This topic describes how to call an API operation of OceanBase Cloud Platform (OCP) in the HTTP mode, using the Query clusters operation as an example.

    Request structure

    A complete HTTP request includes a request URI, a request method , a request header , and a request body .

    Request URI

    A request URI consists of the following parts:

    {scheme}://{endpoint}/{resource-path}?{query-string}
    
    Field
    Description
    scheme The transport protocol, which is typically HTTP or HTTPS.
    endpoint The endpoint of OCP, for example, xxx.xxx.xxx.xxx:8080, which is determined by the specific deployment.
    resource-path The resource path of the API. For more information about the resource path of each API, see the "Request path" section in the documentation of the corresponding API. For example, the resource path for the Query clusters API is /api/v2/ob/clusters.
    query-string The query parameters, which are optional key-value pairs in the format of a=10&b=hello. Separate query-string and resource-path with a question mark (?).

    The following example is a complete URI of the Query clusters API:

    http://xxx.xxx.xxx.xxx:8080/api/v2/ob/clusters
    

    Request method

    A request method is an HTTP method, which can be GET, PUT, POST, or DELETE. The request methods of each API are described in the corresponding API documentation.

    For example, in the request path GET /api/v2/ob/clusters, the request method of the Query clusters API is GET.

    Request header

    A request header contains the additional information of the request, such as the language and authentication information.

    Parameter
    Required
    Description
    Example
    Content-Type Yes The type of the message body. The OCP uses the application/json type message body uniformly. application/json
    Accept-Language No The language supported by the client. OCP APIs support internationalization, and can return content in the specified language based on the language settings of the client. en-US, en, q=0.9 zh-CN
    Authorization Yes The authentication information. OCP APIs use the Basic authentication in compliance with the HTTP specification. The user name and password are encoded in Base64. Basic Zm9vOmJhcg==

    Request body

    The request body is optional. It contains the service data sent to the server. OCP APIs use request bodies in the unified JSON format.

    Authentication description

    Clients that call an OCP API can be authenticated in AK/SK or HTTP Basic authentication mode.

    • HTTP Basic authentication mode

      To call an OCP API, you must pass the Base64-encoded username:password string by using the Authorization attribute in the request header.

      For example, assume that the password of user foo is bar. When user foo calls an OCP API, the following information must be passed in the request header:

      Authorization: Basic Zm9vOmJhcg==
      

      In the preceding information, Zm9vOmJhcg== is the Base64-encoded foo:bar string.

      Notice

      Password leakage may occur in HTTP Basic authentication mode. We recommend that you use the AK/SK authentication mode.

    • AK/SK authentication mode (recommended)

      In AK/SK authentication mode, you do not have to pass a plaintext password in an HTTP request, and you can authorize other users to log on without sharing your password.

      For more information, see Rules for generating a signature by using AK/SK.

    Response structure

    OCP APIs return data in a unified data structure, except for some special APIs. Data structure of the basic return result:

    Parameter
    Type
    Description
    data Object Single-value data, list data, or paged data.
    ├─ contents Array ├── indicates that the content is affiliated with the parameter in the previous row.
    successful Boolean Whether the request is successful.
    timestamp Datetime The timestamp when the server completes the request.
    duration Integer The time that the server takes to process the request, in milliseconds.
    status Integer The encoding in compliance with the HTTP Status specification.
    traceId String The trace ID of the request. This trace ID is used for troubleshooting.
    server String The address of the server that responds to the request.

    Call example

    cURL

    You can use the cURL tool to call APIs. In the following example, the user admin:hello calls the Query tenants API of an OCP application with the IP address xxx.xxx.xxx.xxx, the port information 8080. Where, YWRtaW46aGVsbG8= is the Base64 encoding of admin:hello.

    curl "http://xxx.xxx.xxx.xxx:8080/api/v2/ob/clusters/1/tenants"  \
      -H "Authorization: Basic YWRtaW46aGVsbG8="
    

    cURL also allows you to use a plaintext password to call an API.

    curl "http://xxx.xxx.xxx.xxx:8080/api/v2/ob/clusters/1/tenants"  \
      --user admin:hello
    

    Note

    However, the use of a plaintext password reduces security, so proceed with caution.

    Internationalization

    OCP APIs support internationalization. The API returns the content in the specified language based on the language settings of the client. You can refer to the API documentation to check whether an attribute support internationalization.

    An OCP API uses the Accept-Language attribute in the request header to specify the language option of the client.

    Throttling

    OCP provides the throttling feature to prevent users from accessing OCP too frequently. When creating an OCP user, the system administrator can set a throttling strategy for the user. Resources subject to throttling include global paths, which include all HTTP requests except for static resources. Fine-grained access control allows you to set access limits for different types of resources in OCP. The throttling window can be set to 10s, 1 min, 1 h, and 1 day.

    1

    You can enable or disable the throttling feature by setting the ocp.iam.rate-limit.enabled system parameter. The default value is true, indicating that throttling is enabled.

    When throttling is enabled, the returned header contains the following information:

    1. RateLimit-Limit: The upper limit of access requests in the current time window, for example, 10.

    2. RateLimit-Remaining: The number of remaining access times in the current time window, such as "7".

    3. RateLimit-Reset: The countdown to the reset of the throttling time window, such as "53".

    When a user accesses the corresponding resource interface exceeds the specified threshold in the time window, the request is rejected due to throttling, and the HTTP code 429 is returned. Return result:

    {
        "duration":0,
        "error":{
            "code":0,
            "message":"Excessive number of requests. You have exceeded the request limit for the current throttling window."
        },
        "server":"a83ad33525",
        "status":429,
        "successful":false,
        "timestamp":"2020-12-03T09:38:24.194+08:00",
        "traceId":""
    }
    

    Previous topic

    Overview
    Last

    Next topic

    Rules for generating a signature by using AK/SK
    Next
    What is on this page
    Request structure
    Request URI
    Request method
    Request header
    Request body
    Authentication description
    Response structure
    Call example
    cURL
    Internationalization
    Throttling