Get aggregated derived events
GET/:customer_id/users/:uid/derived-events/aggregated
Get aggregated derived events for a user
Request
Path Parameters
Id of the tenant
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, min_burst_size, max_burst_size, avg_burst_size, min_duration, max_duration, avg_duration]
List fields to return
Possible values: [cough_burst, cough_oasis]
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
If the metric is 'XXX_burst', this is the minimum burst size registered during this aggregation bucket
If the metric is 'XXX_burst', this is the maximum burst size registered during this aggregation bucket
If the metric is 'XXX_burst', this is the average burst size registered during this aggregation bucket
Minimum duration of events registered during this aggregation bucket, if the selected metric has duration
Maximum duration of events registered during this aggregation bucket, if the selected metric has duration
Average duration of events registered during this aggregation bucket, if the selected metric has duration
{
"events": [
{
"time": "2024-12-03T11:32:12.442Z",
"time_tracked_s": 0,
"data": {}
}
]
}
Validation error
- application/json
- Schema
- Example (from schema)
Schema
{
"message": "string",
"errors": [
null
]
}