Querying Host Metric Data
Function
Query host metric 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/host/metricdata
Path parameters
None
Query parameters
Parameter |
Mandatory |
Type |
Value Range |
Description |
---|---|---|---|---|
host_id |
Yes |
string |
None |
Host ID |
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/v1/host/metricdata 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 { "total": 12132, "list": [ { "time_stamp": "1697372808000", "monitor_item": "memory", "region_id": "cn-north-xx", "az_name": "", "metrics_name": "Memory", "operator": "AVG", "host_id": "00700188-9859-xxx8-8889-71axxx4565", "az_id": "", "unit": "\\%", "az_name_en": "", "region_name": "", "data_item": "usage", "region_name_en": "", "value": "79.81" } ] }
Status code
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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot