Skip to main content

Get aggregated events

GET 

/:customer_id/users/:uid/events/aggregated

Get aggregated events for a user

Request

Path Parameters

    customer_id Customer Idrequired

    Id of the tenant

    uid uuidrequired

    Id of the user

Query Parameters

    limit Limit

    Possible values: <= 1000

    Default value: 100

    Pagination. Max number of entries returned.

    offset Offset

    Pagination. Offset.

    device_id uuid

    Id of the device to use, if omitted calculated across all devices.

    aggregation any

    Aggregation bucket size

    start_date date-time

    Start time, timestamp with tz

    end_date date-time

    End time, timestamp with tz

    direction Direction

    Possible values: [asc, desc]

    Default value: desc

    Ascending or descending in time

    omit_empty_buckets Omit Empty Buckets

    Omit empty buckets

    fields string[]

    Possible values: [device_id, count, min1, max1, avg1, sum1, stddev1, min2, max2, avg2, sum2, stddev2]

    List fields to return

    metrics RawMetricsEnum[]

    Possible values: [cough, heartbeat, battery_level, motion, cough_burst, wear, charging, sleep]

    Metric(s) fetched

Responses

Successful response

Schema
    events object[]required
  • Array [
  • time date-timerequired

    Start time of this aggregation bucket.

    time_tracked_s Time Tracked Srequired

    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
    device_id uuid[]nullablerequired

    List of device ids that contributed to this aggregation

    count Countnullablerequired

    Count of events that occurred during this aggregation bucket

    min1 Min1nullablerequired

    Minimum value1 registered during this aggregation bucket

    max1 Max1nullablerequired

    Maximum value1 registered during this aggregation bucket

    avg1 Avg1nullablerequired

    Average of value1 in this aggregation bucket

    sum1 Sum1nullablerequired

    Sum of value1 of events in this aggregation bucket

    stddev1 Stddev1nullablerequired

    Standard deviation of value1 in this aggregation bucket

    min2 Min2nullablerequired

    Minimum value2 registered during this aggregation bucket

    max2 Max2nullablerequired

    Maximum value2 registered during this aggregation bucket

    avg2 Avg2nullablerequired

    Average of value2 in this aggregation bucket

    sum2 Sum2nullablerequired

    Sum of value2 of events in this aggregation bucket

    stddev2 Stddev2nullablerequired

    Standard deviation of value2 in this aggregation bucket

  • ]
Loading...