Platform O&M/Cloud Monitoring/Monitoring and Alarm/SNS/ZWatch Operations/Metric Operations
GETMetric OperationsSince 2.3SynchronousAuth Required
GetMetricData
GetMetricData
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Query Parameters
Request Inputs
Query Parameters
namespaceStringRequiredThe namespace.
metricNameStringRequiredThe metric name.
startTimeLongOptional. The start time.
endTimeLongOptional. The end time.
periodIntegerOptional. The interval for returning data.
Responses
Endpoint
GET/zstack/v1/zwatch/metrics
/zstack/v1/zwatch/metrics
Request Example
curl -X GET 'http://{host}/zstack/v1/zwatch/metrics?namespace=<namespace>&metricName=<metricName>&startTime=1&endTime=1&period=1&labels=<labels>&systemTags=<systemTags>&userTags=<userTags>&functions=<functions>&offsetAheadOfCurrentTime=1' -H 'Authorization: OAuth {sessionUuid}'
Response Example
200{ "data": [ { "value": 101.02, "time": 1.519829245957E12, "labels": { "VMUuid": "9304ab73d9b84852ad1d5061fd4760a5" } } ] }Change History
This API has no change history records yet.
