API: applications and modules
Applications isolate log data (each has its own database and folders); modules group issues within one application. Both are queried with the api query parameter. See API conventions for authentication and base URL.
Applications
?api=applications is global - it is not scoped to any application.
| Method | Action | Success |
|---|---|---|
GET | List all applications | 200 { "data": [...] } |
POST | Create an application | 201 |
Each application returns:
{
"id": "billing",
"name": "Billing",
"database": "applications/billing/log-lens.sqlite",
"logs": "applications/billing/logs",
"processed": "applications/billing/processed",
"sources": "applications/billing/sources",
"created_at": "2026-07-25 09:12:00"
}
POST body
| Field | Required | Notes |
|---|---|---|
name | Yes | 1-100 characters |
id | No | Slugified to [a-z0-9-], 1-64 chars; derived from name if omitted |
The id default is reserved, and a duplicate id is rejected. Creating an application also creates its logs, processed, and sources directories.
Modules
?api=modules is scoped to one application - add &app=<id> (omit app to use the first application; an unknown id returns 422).
| Method | Action | Success |
|---|---|---|
GET | List modules with issue_count | 200 { "data": [...] } |
POST | Create a module | 201 |
GET returns every module ordered by name (case-insensitive), with issue_count counting the issues assigned to it.
POST body
| Field | Required | Default | Notes |
|---|---|---|---|
name | Yes | - | 1-100 characters |
slug | No | derived from name | 1-64 URL-safe chars |
color | No | #6366f1 | Six-digit hex, e.g. #22c55e |
A duplicate name or slug is rejected.
Errors
Both endpoints return 422 with { "error": "..." } for invalid input, 405 for an unsupported method, and 500 for an unexpected failure.