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

Querying External Tenant Resources

Function

Query external tenant resources.

SLA Item

Definition

Request success rate

≥ 99.9%

Availability

Tier 1

Data consistency

Eventual consistency can be achieved. The duration of inconsistency is less than 1 minute.

Throughput

4000 TPS

TP50 request latency

2 ms

TP99.9 request latency

5 ms

Precautions

None

Calling Method

GET

URI

/rest/dataapi/homs/open-api/v2/cloudresource/instancedata/{resource_type}

Path parameters

Parameter

Mandatory

Type

Value Range

Description

resource_type

Yes

string

  • ECS
  • EVS
  • EIP
  • OBS
  • BMS
  • ELB
  • VPN
  • DCS
  • DMS
  • RDS
  • GAUSS
  • MODEL_ARTS_INF
  • MODEL_ARTS_TRAIN
  • MODEL_ARTS_MAOS

Resource Type

Query parameters

Parameter

Mandatory

Type

Value Range

Description

begin_time

Yes

integer

None

Start time

end_time

Yes

integer

None

End time

offset_value

No

integer

None

Offset: greater than or equal to 0

page_size

No

integer

0~1000

Page size: greater than or equal to 0

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

    No

    string

    None

    ID of the accessed tenant. This parameter is mandatory only in the HCS Online scenario.

    x-hcso-appcode

    Yes

    string

    None

    AppCode allocated by SRE

  • Request body parameters

    None

  • Sample request
    GET /rest/dataapi/homs/open-api/v2/cloudresource/instancedata/{resource_type} 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
  • 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
    {
        "list": [
                 {
                 "accumulate_factor_name": "Duration",
                 "accumulate_factor_value": "3600",
                 "az_code": "cn-north-213a",
                 "begin_time": "20240301220000",
                 "bp_info": "",
                 "cloud_service_type_code": "hws.service.type.ec2",
                 "csb_params": "::DBSS-9bae:d8c249f201b34a4eb7f739f3471d1532:",
                 "domain_id": "d1803845584b4626850ce57a8a020e4f",
                 "domain_name": "op_svc_dbss_e9f3e8381583492191a9d0c4ba725333",
                 "enterprise_project_id": "",
                 "error_msg": "",
                 "extend_params": "2",
                 "extend_params2": "",
                 "record_type": "20",
                 "region_code": "cn-north-213",
                 "relate_parent_resource": "",
                 "relate_root_resource": "",
                 "resource_id": "f0ae18b6-40d2-4162-9d6a-7697b9b7eacc",
                 "resource_spec_code": "ks1.xlarge.2.linux",
                 "resource_type_code": "hws.resource.type.vm",
                 "site_code": "",
                 "tag": "",
                 "time_stamp": "20240409231657",
                 "project_id": "d1803845584b4626850ce57a8a020emf"
                  }
                ],
                "total": 31416
    }

Status Codes

Status Code

Description

200

Operation successful.

400

Parameter error.

401

Token authentication failed.

403

Authentication failed.

404

The API was not found.

Operation Severity

Minor