EP. Get Category Metric Latest Values
Fetch the latest values of all metrics that are assigned a specific category.
URI
/api/v1/locations/{LOCATION_ID}/categories/{CATEGORY_ID}/count
Request Query Parameters
Request Parameter | Description |
---|---|
LOCATION_ID | UUID assigned to a specific location |
CATEGORY_ID | ID of a target category |
Response
{
"type": "array",
"items": {
"type": "object",
"properties": {
"metric_uuid": {
"type": "string"
},
"count": {
"type": "number"
},
"float_value": {
"type": "number"
},
"formatted_value": {
"type": "string"
},
"time": {
"type": "string"
}
}
}
}
Response Parameter | Description |
---|---|
metric_uuid | A unique identifier of a metric. |
count | Value of a metric as integer . |
float_value | Value of a metric as float . |
formatted_value | Formatted value of a metric as string . |
time | Time 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": "93a4ae22-ffa5-488d-9b2f-58940a429062",
"count": 12,
"float_value": 12,
"formatted_value": "12",
"time": "2024-01-28T09:02:12Z"
},
{
"metric_uuid": "67b0acd4-49e2-4a62-846d-d10e1571ab10",
"count": 0,
"float_value": 0,
"formatted_value": "0",
"time": "2024-01-28T09:01:47Z"
}
],
"success": true
}