{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/WorkspaceMetricsResponse", "title": "WorkspaceMetricsResponse", "type": "object", "required": [ "workspaceId", "metricName" ], "properties": { "workspaceId": { "type": "string", "example": "Y2lzY29zcGFyazovL3VzL09SR0FOSVpBVElPTi85NmFiYzJhYS0zZGNjLTExZTUtYTE1Mi1mZTM0ODE5Y2RjOWE" }, "metricName": { "type": "string", "enum": [ "soundLevel", "ambientNoise", "temperature", "humidity", "tvoc", "peopleCount" ] }, "aggregation": { "type": "string", "enum": [ "none", "hourly", "daily" ] }, "from": { "type": "string", "example": "2020-10-21T13:33:37.789Z" }, "to": { "type": "string", "example": "2020-10-31T16:00:00.532Z" }, "unit": { "type": "string", "enum": [ "celsius", "fahrenheit" ], "description": "Output data unit (only present if `metricName` is `temperature`)." }, "sortBy": { "type": "string", "enum": [ "newestFirst", "oldestFirst" ] }, "items": { "type": "array", "items": {}, "description": "The structure of the elements will depend on whether or not aggregated data was requested" } } }