// PART 08
API catalog and endpoint inventory
Endpoint families
| Family | Prefix | Example routes |
|---|---|---|
| Users / profile | /api/user/*, /api/users/* |
GET /api/users |
| Admin | /api/admin/* |
GET /api/admin/dashboard/stats |
| Drive files | /api/files/* |
GET /api/files/list, POST /api/files/write |
| Apps / catalog | /api/apps/* |
GET /api/apps/catalog |
| CRM / people | /api/crm/*, /api/contacts/* |
see generated reference |
| Products / billing | /api/products/*, /api/billing/* |
see generated reference |
| Analytics | /api/analytics/* |
GET /api/analytics/usage |
| Office events | /api/events/*, /ws/events* |
POST /api/events/publish, GET /ws/events/stream |
| Approvals | /api/approvals/* |
POST /api/approvals, POST /api/approvals/:id/decide — see section below |
/chat/* is not a REST prefix: chat runs over the WebSocket pipeline at
/ws (see WebSocket protocol). The only
/api/chat* routes are the history/session helpers in
botserver/src/main_module/routes/chat_handlers.rs.
The full, code-derived table is generated.
Chapter contents
- Generated REST reference — every route, from the code
- Files API —
/api/files/* - Users API — user management
- Groups API — groups and membership
- Conversations API — chat sessions
- Admin routes — the
/api/admin/*routes, generated from the code - AI API — LLM endpoints
- MCP format and tool definitions
- Example integrations — code samples
Where the inventory comes from
Three code sources feed the generated reference:
| Source | What it contributes |
|---|---|
Route registrations (main_module/routes/, feature crates) |
method, path, mounting file |
core/bot/endpoint_inventory*.rs, endpoint_prefix_map.rs |
curated endpoint summaries and prefix rules |
core/bot/api_catalog/ |
the compact command catalog the LLM sees (commands_list/) |
python3 scripts/gen_api_reference.py # write the pages
python3 scripts/gen_api_reference.py --check # fail on drift
Two catalogs, one rule
There are two different “catalogs” and they answer different questions:
| Catalog | Question it answers | Consumer |
|---|---|---|
| Endpoint inventory (this page’s generated tables) | “What routes exist?” | humans, guard scripts |
API command catalog (api_catalog/commands_list/) |
“What may the LLM call, with which params, and is it admin-only?” | the chat pipeline |
The rule from the feature-adding workflow: a new endpoint that should be
answerable in chat must be registered in the command catalog (declarative
entry, executed backend-side, results fed back to the LLM). Registration is
also the RBAC surface: admin_only entries are filtered from the manifest
for non-admin users via resolve_user_role, and the executor enforces the
same rule server-side — never rely on prompt text for authorization.
Using the inventory in review
| Task | Method |
|---|---|
| Does route X exist? | grep the generated reference (never trust a tutorial or an old page) |
| Is a prefix reserved? | endpoint_prefix_map.rs lists the prefixes and their rules |
| Why is a route not chat-reachable? | it is not in the command catalog — that is by design |
| Guard drift | --check fails when prose or the inventory disagree with the code |