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 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.
Default value: 60
Minimum minutes of tracking for a given day to contribute in a streak. Defaults to 60.
Id of the device on which to base the calculations of. If omitted all data from all devices will be used.
Responses
- 200
- 400
OK
- application/json
- Schema
- Example (from schema)
Schema
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.
The start date passed chopped to the day level without timezone.
{
"streak": 0,
"streak_start": "2024-12-03T11:32:11.829Z"
}
Not OK
- application/json
- Schema
- Example (from schema)
Schema
Error message
{
"message": "string"
}