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

Querying VM Performance Data

Function

Query VM performance data.

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/v1/ecs/performance

Path parameters

None

Query parameters

Parameter

Mandatory

Type

Value Range

Description

begin_time

Yes

integer

None

Start time

end_time

Yes

integer

None

End time

offset_value

Yes

integer

None

Offset: greater than or equal to 0

page_size

Yes

integer

Default value: 500

Page size: greater than or equal to 0

vm_id

No

string

None

VM ID

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/v1/ecs/performance?begin_time=0&end_time=0&offset_value=0&page_size=1
    Content-Type: application/json
    Accept: application/json
    X-Auth-Token: xxxxx
    x-hcso-appcode: xxxx

Response

  • Response parameters
  • Sample response
    HTTP/1.1 200 OK
    Content-Type: application/json;charset=UTF8
    {
    	"total": 1,
    	"list": [
    		{
    			"SERVICE": "ECS",
    			"REGION_ID": "cn-north-7",
    			"NAMESPACE": "ecs",
    			"SOURCE_SERVICE": "CES",
    			"SOURCE_TYPE": "TenantMon",
    			"SOURCE_TAG": "CN_NORTH_7_ECS",
                "TENANT_NAME": "xxx",
                "METRIC_NAME": "cpu_usage",
                "METRIC_VALUE": "10",
                "METRIC_UNIT": "%",
                "INSTANCE_ID": "abfa96bc-29f6-4571-bfba-fcfdf6ad6ebb",
                "TIMESTAMP": "1726819320000"
    		}
    	]
    }

Status Codes

Status Code

Description

200

Query succeeded.

400

Parameter error.

401

Token authentication failed.

403

Authentication failed.

404

The API was not found.

Operation Severity

Minor