Get aggregated events (group)
GET/:customer_id/groups/:group_id/users/:uid/events/aggregated
Get aggregated events for a user in a group
Request
Path Parameters
Id of the tenant
Id of the group
Id of the user
Query Parameters
Possible values: <= 1000
Default value: 100
Pagination. Max number of entries returned.
Pagination. Offset.
Id of the device to use, if omitted calculated across all devices.
Aggregation bucket size
Start time, timestamp with tz
End time, timestamp with tz
Possible values: [asc, desc]
Default value: desc
Ascending or descending in time
Omit empty buckets
Possible values: [device_id, count, min1, max1, avg1, sum1, stddev1, min2, max2, avg2, sum2, stddev2]
List fields to return
Possible values: [cough, heartbeat, battery_level, motion, cough_burst, wear, charging, sleep]
Metric(s) fetched
Responses
- 200
- 400
Successful response
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
events object[]required
Start time of this aggregation bucket.
Seconds tracked inside this aggregation bucket. ie. If aggregation='hour' the maximum would be 60(minutes)*60(seconds).
data objectrequired
Dict containing an entry for each metric requested (if available in this aggregation bucket).
property name* PerMetricAggregatedData
List of device ids that contributed to this aggregation
Count of events that occurred during this aggregation bucket
Minimum value1 registered during this aggregation bucket
Maximum value1 registered during this aggregation bucket
Average of value1 in this aggregation bucket
Sum of value1 of events in this aggregation bucket
Standard deviation of value1 in this aggregation bucket
Minimum value2 registered during this aggregation bucket
Maximum value2 registered during this aggregation bucket
Average of value2 in this aggregation bucket
Sum of value2 of events in this aggregation bucket
Standard deviation of value2 in this aggregation bucket
{
"events": [
{
"time": "2024-12-03T11:32:12.488Z",
"time_tracked_s": 0,
"data": {}
}
]
}
Validation error
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string",
"errors": [
null
]
}