API reference
Every public endpoint is served by the gateway under https://api.atelier-maker.fr/v1/*
(locally http://localhost:8080). The gateway authenticates the caller, signs a
principal token and proxies the request to the owning service, which checks
permissions through authz.
The pages below are generated at build time from services/<name>/openapi.yaml
(pnpm gen-api, plugin docusaurus-plugin-openapi-docs). A service without a specification yet is skipped.
| Service | Prefix | Reference |
|---|---|---|
| gateway | /v1/auth/* | gateway |
| authz | /v1/authz/*, /v1/public/settings | authz |
| members | /v1/members/* | members |
| audit | /v1/audit/* | audit |
| files | /v1/files/* | files |
| inventory | /v1/inventory/* | inventory |
| events | /v1/events/*, /v1/public/events, /v1/public/calendar* | events |
| borrowing (in progress, not routed in compose yet) | /v1/borrowing/* | borrowing |
| vision | internal HTTP (see page) | vision (written by hand, no OpenAPI file) |
The gateway's built-in default routing table (GATEWAY_ROUTES) only covers authz, members, audit and the public
settings; the compose stack sets GATEWAY_ROUTES to also route files, inventory and events.
The gateway matches a route prefix exactly or followed by /, so in that compose setup
/v1/public/calendar.ics (public ICS feed) is not routed (503 upstream_unavailable) while
/v1/public/calendar/<token>.ics is.
Internal service-to-service calls use ConnectRPC: see internal RPC (authz).
Conventions
- Authentication: browser session cookie
atl_session(set by/v1/auth/*,HttpOnly,SameSite=Lax) orAuthorization: Bearer <API key>. See access levels. - Errors: RFC 9457
application/problem+jsonwith a stablecode(unauthenticated,forbidden,validation_failed,rate_limited,step_up_required,admin_mode_required, …). 429 responses carryRetry-After. - Pagination: every list endpoint is cursor-based:
?limit=(1–200, default 25) and?cursor=; the response holdsitemsandnext_cursor(absent on the last page). - IDs: Keycloak user IDs for members, ULIDs for everything else; resources are addressed in permissions
by ARN (
atl:<service>:<site>:<type>/<id>). - CSRF: unsafe methods with a session cookie must come from an allowed origin (
WEB_ORIGINS). - Admin mode: send
X-Atl-Admin-Mode: 1to activate elevated permissions.