Skip to main content

Get events v2 (JWT)

GET 

/events/v2

Retrieve all events associated with a user

Request

Query Parameters

    aggregation Aggregationsrequired

    Possible values: [raw, 15min, hour, day, week, month]

    device_id uuid
    metric Metricsrequired

    Possible values: [cough, heartbeat, cough_burst, cough_oasis, battery_level]

    start_date date-timerequired
    end_date date-timerequired
    limit integer

    Pagination

    offset integer

    Pagination

    direction string

    Possible values: [asc, desc]

    Default value: asc

    Order by time ascending vs descending

    fields string

    Comma separated name of the fields to return. All aggregations: [uid, device_id, time, metric] Raw: [utc_time, sensor, value1, value2] Non-Raw aggregation: [time_tracked_s, min[1,2], max[1,2], count, avg[1,2], sum[1,2], stddev[1,2]]

Responses

Successful operation

Schema
  • Array [
  • time date-time

    Time at which the event happened if raw aggregation. Start of the time bucket if non-raw aggregation.

    device_id uuid[]

    Array with a the event capturing device_id if raw aggregation. Array of all the device ids that contributed to this aggregate if non-raw aggregation.

    uid uuid

    Id of the user.

    value1 double

    Value 1 assigned to this event upon creation.

    value2 double

    Value 2 assigned to this event upon creation.

    sensor string

    Sensor name/version assigned to this event upon creation.

    utc_time date-time

    Time zoned timestamp at which this event was created.

    metric Metrics

    Possible values: [cough, heartbeat, cough_burst, cough_oasis, battery_level]

    time_tracked_s integer

    Ammount of seconds in which tracking was enabled (calculated from heartbeats) during the time bucket.

    count double

    Only non-raw aggregation, count of events within time bucket.

    min1 double

    Only non-raw aggregation, minimum of value1 within time bucket.

    max1 double

    Only non-raw aggregation, maximum of value1 within time bucket.

    avg1 double

    Only non-raw aggregation, average of value1 within time bucket.

    sum1 double

    Only non-raw aggregation, sum of value1 within time bucket.

    stddev1 double

    Only non-raw aggregation, standard deviation of value1 within time bucket.

    min2 double

    Only non-raw aggregation, minimum of value2 within time bucket.

    max2 double

    Only non-raw aggregation, maximum of value2 within time bucket.

    avg2 double

    Only non-raw aggregation, average of value2 within time bucket.

    sum2 double

    Only non-raw aggregation, sum of value2 within time bucket.

    stddev2 double

    Only non-raw aggregation, standard deviation of value2 within time bucket.

  • ]
Loading...