Get state timelines (group)
GET/:customer_id/groups/:group_id/users/:uid/state-timelines
Get state timelines for a user in a group
Request
Path Parameters
customer_id Customer Idrequired
Id of the tenant
group_id Group Idrequired
Id of the group
uid uuidrequired
Id of the user
Query Parameters
from date-timerequired
Start date
to date-timerequired
End date
device_id uuid
Device ID
metric StateMetricsEnum[]required
Possible values: [sleep, wear, charging]
List of state metrics
Responses
- 200
- 400
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
state_timelines object[]
List of state timelines
metric object
device_id uuidrequired
Device ID
periods object[]
List of state periods
value Valuerequired
Possible values: [on, off, unknown]
State value
from date-timerequired
Local time at which the state started
to date-timerequired
Local time at which the state ended
{
"state_timelines": [
{
"metric": "sleep",
"device_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"periods": [
{
"value": "on",
"from": "2024-12-03T11:32:12.496Z",
"to": "2024-12-03T11:32:12.496Z"
}
]
}
]
}
Validation error
- application/json
- Schema
- Example (from schema)
Schema
message Messagerequired
errors undefined[]nullablerequired
{
"message": "string",
"errors": [
null
]
}
Loading...