Bulk read events (API Key)
POST/migration/events/fetch
Bulk fetch data for several uids at once.
Request
Query Parameters
aggregation Aggregationsrequired
Possible values: [raw, 15min, hour, day, week, month]
metric Metricsrequired
Possible values: [cough, heartbeat, cough_burst, cough_oasis, battery_level]
start_date date-timerequired
end_date date-timerequired
limit integer
(Optional) Pagination
offset integer
(Optional) Pagination
direction string
Possible values: [asc, desc]
Default value: asc
(Optional) Order by time ascending vs descending
fields string
Default value: time,uid,device_id,count,metric
(Optional) Comma separated name of the fields to return. All aggregations: [uid, device_id, time, metric, count] Raw: [utc_time, sensor, value, value1, value2] Non-Raw aggregation: [min, max, count, avg, sum, stddev]
- application/json
Body
- Array [
- ]
users object[]
uid uuid
User uid
device_id uuid
Device id
Responses
- 200
- 400
OK
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
user object
uid uuid
User uid
device_id uuid
Device id
statusCode integer
Possible values: [200, 400]
message string
events object[]
time date-time
id uuid
device_id uuid
uid uuid
sensor string
metric Metrics
Possible values: [cough, heartbeat, cough_burst, cough_oasis, battery_level]
value double
time_tracked_s integer
[
{
"user": {
"uid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"device_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"statusCode": 200,
"message": "string",
"events": [
{
"time": "2024-12-03T11:32:11.824Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"device_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"uid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sensor": "string",
"metric": "cough",
"value": 0,
"time_tracked_s": 0
}
]
}
]
Not OK
- application/json
- Schema
- Example (from schema)
Schema
message string
Error message
{
"message": "string"
}
Loading...