API Reference¶
API handler documentation is auto-generated by docs/scaffold.sh. Individual handler pages will appear here as they are scaffolded.
Work in progress
Detailed API documentation for each endpoint is planned for Story 46.3+. For now, refer to the source code:
- Backend routes:
server/crates/api/src/router.rs - Backend handlers:
server/crates/api/src/handlers/ - Frontend API clients:
client/src/lib/api/
Endpoint Groups¶
| Resource | Route prefix | Handler file |
|---|---|---|
| Auth | /api/auth |
auth.rs |
| Cases | /api/cases |
cases.rs |
| Participants | /api/participants |
participants.rs |
| Deeds | /api/deeds |
deeds.rs |
| Documents | /api/documents |
documents.rs |
| Templates | /api/templates |
templates.rs |
| Offices | /api/offices |
offices.rs |
| Users | /api/users |
users.rs |
Conventions¶
- All endpoints return JSON with
Content-Type: application/json - Authentication via
Authorization: Bearer <JWT>header - Errors use RFC 7807
ProblemDetailsformat - Field names are
camelCase(via#[serde(rename_all = "camelCase")]) - List endpoints support
?page=1&per_page=25pagination - 409 Conflict for optimistic locking violations (
versionmismatch)