Querying Collected Data of a Specified Metric
Function
This API is used to query the collected data of a specified metric.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/clusters/{cluster_id}/dms/metrics/{metric_name}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
cluster_id |
Yes |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints The value must be a valid DWS cluster ID. Range It is a 36-digit UUID. Default Value N/A |
metric_name |
Yes |
String |
Definition Metric name. Constraints N/A Range N/A Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
Yes |
Integer |
Definition Page offset, which starts from 0 (page number minus 1). Constraints N/A Range Greater than or equal to 0 Default Value 0 |
limit |
Yes |
Integer |
Definition Size of a single page. Constraints N/A Range Greater than 0 and less than or equal to 1000 Default Value No limit. |
from |
Yes |
Long |
Definition Start time of the collection. Its value is a 13-digit timestamp. Constraints N/A Range The value is a 13-digit timestamp. Default Value N/A |
to |
Yes |
Long |
Definition End time of the collection. Its value is a 13-digit timestamp. Constraints The interval between the start time and end time cannot exceed one day. Range The value is a 13-digit timestamp. Default Value N/A |
order_by |
No |
String |
Definition Sorting field. The value is fixed. Constraints N/A Range ctime: collection time Default Value N/A |
sort_by |
No |
String |
Definition Description request. Constraints Whether the order is ascending or descending. The value is fixed. Range asc desc Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
code |
Integer |
Definition Response code. Range N/A |
msg |
String |
Definition Response information. Range N/A |
data |
Array of Map<String,Object> objects |
Definition List of collected metric data. Range N/A |
count |
Long |
Definition Total number of rows in the list. Range N/A |
Example Requests
https://{Endpoint}/v1/{project_id}/clusters/{cluster_id}/dms/metrics/TableDirtyPageRate?limit=1&offset=0&from=1701914324000&to=1701942194000&order_by=ctime&sort_by=desc
Example Responses
Status code: 200
Collected data of the metric queried.
{ "code" : 0, "msg" : "OK", "data" : [ { "table_size" : 40960, "virtual_cluster_id" : 53, "db_name" : "postgres", "ctime" : 1701929836000, "table_owner" : "Ruby", "schema_name" : "pmk", "table_name" : "pmk_meta_data", "dirty_page_rate" : 0.8 } ], "count" : 3 }
Status Codes
Status Code |
Description |
---|---|
200 |
Collected data of the metric queried. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
No operation permissions. |
500 |
Internal server error. |
503 |
Service unavailable. |
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