Skip to main content

EP. Get Metric Latest Value

Fetch the latest value of a specific metric.

URI

/api/v1/locations/{LOCATION_ID}/metrics/{METRIC_ID}/count

Request Query Parameters

Request ParameterDescription
LOCATION_IDUUID assigned to a specific location
METRIC_IDID of a target metric

Response

The schema of the `data` section of JSON response
{
"type": "object",
"properties": {
"metric_uuid": {
"type": "string"
},
"count": {
"type": "number"
},
"float_value": {
"type": "number"
},
"formatted_value": {
"type": "string"
},
"time": {
"type": "string"
}
}
}
Response ParameterDescription
metric_uuidA unique identifier of a metric.
countValue of a metric as integer.
float_valueValue of a metric as float.
formatted_valueFormatted value of a metric as string.
timeTime when the value of this metric was acquired / derived, RFC3339 date string. Time value does not have a timezone, it is a time in location timezone.
Sample Response
{
"data": {
"metric_uuid": "51f5c88a-d55c-46cb-8449-c197e5438f96",
"count": 64,
"float_value": 64,
"formatted_value": "64",
"time": "2024-01-28T20:19:55Z",
},
"success": true
}