Query your data
Every piece of data in Life Logger is accessible via a REST API. Use any HTTP client — curl, Python, JavaScript, a spreadsheet macro — to pull your events and statistics programmatically.
Sessions expire after 1 hour of inactivity. Any API call resets the timer. Log out and back in from the main app to get a fresh token.
Base URL
Required header on every request
Authorization: Bearer <your-token>
curl \
-H "Authorization: Bearer <token>"
// Response
{
"id": 1,
"username": "yourname",
"display_name": "Jacob",
"created_at": "2026-03-24T12:00:00+00:00"
}
curl \
-H "Authorization: Bearer <token>"
// Response
{ "labels": ["Exercise", "Programming", "Reading"] }
Query params: start and end as UTC ISO 8601 strings. Matches events whose started_at falls within the range.
curl "" \
-H "Authorization: Bearer <token>"
// Response
{
"events": [
{
"id": 42,
"label": "Programming",
"started_at": "2026-03-24T09:00:00+00:00",
"ended_at": "2026-03-24T11:30:00+00:00"
}
]
}
Same date range params as /events. Returns percentage share and total minutes per label. An active event is counted up to the current time.
curl "" \
-H "Authorization: Bearer <token>"
// Response
{
"percentages": { "Programming": 62.5, "Exercise": 37.5 },
"minutes": { "Programming": 187.5, "Exercise": 112.5 }
}
curl -X PATCH \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"display_name": "New Name"}'
FastAPI generates a full interactive API explorer automatically. You can authenticate with your token and try every endpoint directly in the browser — no curl required.
Life Logger is open source
Bug reports, feature requests, and pull requests are all welcome. If you build something with the API, feel free to share it.