Skip to main content

Get days of streak usage (JWT)

GET 

/insights/streak

From the start date how many days straight has this user tracked for more than tracking_threshold_minutes?

Request

Query Parameters

    start date-timerequired

    Start point of streak calculation. Most often this will be set to the current time, however the backend needs to know the timezone of the user to properly figure out what day they are in.

    tracking_threshold_minutes number

    Default value: 60

    Minimum minutes of tracking for a given day to contribute in a streak. Defaults to 60.

    device_id uuid

    Id of the device on which to base the calculations of. If omitted all data from all devices will be used.

Responses

OK

Schema
    streak number

    Number of days in streak. A streak of 1 means 2 days tracking in a row, streak of 2 means 3 days, etc... Regardless of the tracking done on start it will count start as an active day.

    streak_start date-time

    The start date passed chopped to the day level without timezone.

Loading...