Get days of streak usage (group)
GET/:customer_id/groups/:group_id/users/:uid/insights/streak
From the start date how many days straight has this user tracked for more than tracking_threshold_minutes? for a user that belongs to a group
Request
Path Parameters
customer_id Customer Idrequired
Id of the tenant
group_id Group Idrequired
Id of the group
uid uuidrequired
Id of the user
Query Parameters
start date-timerequired
Start point of the streak calculation. Most times should be set to the current time of the user.
device_id uuid
Id of the device to use, if omitted calculated across all devices.
tracking_threshold_minutes Tracking Threshold Minutes
Default value: 60
Minimum minutes of tracking for a given day to contribute in a streak.
Responses
- 200
- 400
Successful response
- application/json
- Schema
- Example (from schema)
Schema
streak Streakrequired
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-timerequired
The start date passed chopped to the day level without timezone.
{
"streak": 0,
"streak_start": "2024-12-03T11:32:12.476Z"
}
Validation error
- application/json
- Schema
- Example (from schema)
Schema
message Messagerequired
errors undefined[]nullablerequired
{
"message": "string",
"errors": [
null
]
}
Loading...