EP. Get List of Metrics by Category
Fetch definition list of metrics that are assigned a specific category.
info
Each metric can be assigned one or more categories. This allows for access to multiple metrics using single API call.
URI
/api/v1/locations/{LOCATION_ID}/categories/{LOCATION_ID}/metrics
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": {
"uuid": {
"type": "string"
},
"folder_id": {
"type": "number"
},
"name": {
"type": "string"
},
"metric_type": {
"type": "string"
}
}
}
}
Response Parameter | Description |
---|---|
uuid | A unique identifier of a metric. |
name | Metric name. |
folder_id | Identifier of a venue sector that this metric belongs to. |
metric_type | Describes the nature of a metric. Possible options: simple - value of this metric is acquired directly from the censor; derivative - value of this metric is calculated using derivation expression, which in many cases may involve multiple simple metrics. |
Sample Response
{
"data": [
{
"uuid": "93a4ae22-ffa5-488d-9b2f-58940a429062",
"name": "Treadmill #1 Occupancy",
"folder_id": 92,
"metric_type": "simple"
},
{
"uuid": "67b0acd4-49e2-4a62-846d-d10e1571ab10",
"name": "Treadmill #2 Occupancy",
"folder_id": 93,
"metric_type": "simple"
},
{
"uuid": "f11920ae-40cc-4db2-9731-887d37265567",
"name": "Treadmill #3 Occupancy",
"folder_id": 96,
"metric_type": "simple"
},
{
"uuid": "177ca776-c467-470b-bc4b-28b3e1b411cf",
"name": "Treadmill #4 Occupancy",
"folder_id": 97,
"metric_type": "simple"
}
],
"success": true
}