Updated on 2025-11-05 GMT+08:00

Querying the OBS Capacity

Function

Query the total, allocated, and available OBS capacities.

SLA Item

Definition

Request success rate

≥ 99%

Availability

Tier 2

Data consistency

Strongly consistent

Throughput

60 times/minute

TP50 request latency

200 ms

TP99.9 request latency

300 ms

Precautions

None

Calling Method

GET

URI

/rest/dataapi/homs/open-api/v1/CloudService/capacity

Path parameters

None

Query parameters

None

Request

  • Request header parameters

    Parameter

    Mandatory

    Type

    Value Range

    Description

    X-APIG-Appcode

    Yes

    string

    None

    AppCode allocated by SRE

    x-auth-token

    Yes

    string

    None

    IAM authentication token for the calling party APIG

    x-hcso-domainid

    Yes (HCS Online scenario)

    No (other scenarios)

    string

    None

    ID of the accessed tenant.

    x-hcso-appcode

    Yes

    string

    None

    AppCode allocated by SRE

  • Query parameters

    Parameter

    Mandatory

    Type

    Value Range

    Description

    begin_time

    Yes

    int

    None

    Start timestamp of the query, in milliseconds

    end_time

    Yes

    int

    None

    End timestamp of the query, in milliseconds

    service_type

    No

    string

    OBS

    Service type

    zone_type

    No

    string

    OBS_POD

    OBS pod

    page_size

    Yes

    int

    0~1000

    Page size

    offset_value

    Yes

    int

    None

    Query start value

  • Request body parameters

    None

  • Sample request
    GET /rest/dataapi/homs/open-api/v1/CloudService/capacity?service_type=OBS HTTP/1.1 
    Host: example.com
    Content-Type: application/json 
    Accept: application/json
    X-APIG-Appcode: xxx 
    x-auth-token: xxx 
    x-hcso-domainid: xxx
    x-hcso-appcode: xxx

Response

  • Response parameters

    Parameter

    Type

    Value Range

    Description

    resource_type

    string

    None

    Resource type

    available

    String

    None

    Remaining capacity in TB

    az_name

    string

    None

    AZ name

    used

    Float64

    None

    Used resources

    used_ratio

    Float64

    None

    Usage

    az_id

    string

    None

    AZ ID

    service_type

    String

    None

    Cloud service name, which identifies the cloud service to which resources belong. For this API, the value can be OBS.

    total

    Integer

    None

    Number of data records

    az_name_en

    string

    None

    AZ name (English)

    metric_type

    String

    None

    OBS resource type, which can be a single-AZ or multi-AZ architecture

    zone_type

    String

    None

    OBS is globally deployed and is not associated with any AZs.

    free

    Float64

    None

    Remaining resources

    region

    String

    None

    Name of the region to which resources belong

    resource_count

    Float64

    None

    Total number of resources

    allocated

    String

    None

    Allocated capacity in TB

    timestamp

    Long

    None

    Timestamp

  • Sample response
    HTTP/1.1 200  OK 
    Date:Tue,18 Jul 2023 09:58:01 GMT
    Server: example.com
    Content-Type: application/json;charset=UTF8 
    { 
        "total":33, 
        "list":[ 
                { 
                "resource_type": "",
                "available": "13.06640625",
                 "az_name": "AZ 1",
                "used": "74.2802734375",
                "used_ratio": "0.40409390589222816",
                "az_id": "cn-north-213a",
                "service_type": "OBS",
                "total": "238.96484375",
                "az_name_en": "AZ1",
                "metric_type": "a",
                "zone_type": "MANAGE",
                "free": "109.5390625",
                "region": "cn-north-213",
                "resource_count": "1690",
                "allocated": "225.8984375",
                "timestamp": "1756742400000"
               }
              ]
    }

Status Codes

Status Code

Description

200

Operation successful.

400

Parameter error.

401

Token authentication failed.

403

Authentication failed.

404

The REST API was not found.

500

An internal application error occurred.