Skip to content

Get user statistics​

GET
/api/stats

Without start and end, returns a summary (today, this week, this
month, all time). With both, returns { stats: [...] }, one row per
day that has stats in the range, oldest first.

Authorizations​

bearerAuth

API token created via POST /api/tokens or the db:create-token CLI command

Type
HTTP (bearer)

Parameters​

Query Parameters

start

Start date for daily stats range (YYYY-MM-DD)

Type
string
Format
"date"
end

End date for daily stats range (YYYY-MM-DD)

Type
string
Format
"date"

Responses​

Stats summary or daily stats for date range

application/json
JSON
{
"data": {
"today": {
"id": 0,
"user_id": 0,
"date": "string",
"completions": 0,
"tasks_created": 0,
"snoozes": 0
},
"week": {
"completions": 0,
"tasks_created": 0,
"snoozes": 0
},
"month": {
"completions": 0,
"tasks_created": 0,
"snoozes": 0
},
"all_time": {
"completions": 0,
"tasks_created": 0,
"snoozes": 0
}
}
}

Samples​

Powered by VitePress OpenAPI