API Endpoint Inventory¶
Document status: Source-derived inventory · Runtime verification pending
This document provides a consolidated inventory of HTTP endpoints identified in the WhiteLotusAI source repository. It records route paths, HTTP methods, service ownership, and operational considerations to support API discovery, engineering work, and security reviews.
Scope and limitations
This is a source-derived route inventory, not a guarantee of runtime availability, deployment exposure, or security. Authentication, authorization, request and response schemas, handler side effects, and actual deployment routing must be verified independently.
At a glance¶
-
Gateway API
Authentication, profiles, sessions, administration, RAG, chat, and proxy routing.
-
Chat service
Streaming responses, tool dispatch, plugin discovery, and connection management.
-
Integrations
Jira, Slack, Microsoft Teams, Gmail, Google Calendar, and Google Drive.
-
Security review
Read-only policy, OAuth and token exposure, webhook validation, and access controls.
1. How to read this inventory¶
Route conventions¶
API_ROOTdefaults to/apifor gateway routers. If this setting changes, gateway route paths may change accordingly.- The integrations service registers integration and webhook routers under
/api/integrations-svc. - The chat service registers its router under
/api/chat-svc. - OAuth metadata, OAuth flow, and MCP routes are registered separately from the integrations prefix.
{parameter}denotes a path parameter.- Query parameters and required headers are not exhaustively listed.
GETis generally retrieval-oriented. Other methods may change application state.- A route's presence in source code does not prove that it is enabled, reachable, or publicly exposed in a deployed environment.
Do not infer public URLs from service routes
The gateway proxy configuration, router registration order, upstream URLs, reverse proxy, and deployment topology determine how clients can reach downstream routes. A service-level prefix is not necessarily the final public URL.
Endpoint method guide¶
| Method | Typical purpose | Review consideration |
|---|---|---|
GET |
Retrieve information | Check authorization, data exposure, and handler side effects. |
POST |
Submit an operation or create a resource | Determine whether the operation changes state. |
PUT |
Replace or update a resource | Verify ownership and authorization. |
PATCH |
Partially update a resource | Verify which fields may change. |
DELETE |
Remove or deactivate a resource | Verify ownership, permissions, and deletion semantics. |
2. Service and routing overview¶
The diagram illustrates the documented service boundaries. It does not assert that every downstream endpoint is publicly reachable through the gateway.
flowchart TB
CLIENT["Client Application"]
GATEWAY["REST API Gateway<br/>FastAPI · API_ROOT"]
subgraph GW["Gateway Route Groups"]
direction LR
AUTH["Authentication<br/>Profiles · Sessions"]
ADMIN["Administration"]
RAG["RAG and Documents"]
PROXY["Chat and Proxy"]
end
subgraph SERVICES["Downstream Services"]
direction LR
CHAT["Chat Service<br/>/api/chat-svc"]
INT["Integrations Service<br/>/api/integrations-svc"]
end
subgraph EXT["Integration and Protocol Routes"]
direction LR
WEBHOOK["Webhooks"]
OAUTH["OAuth Endpoints"]
MCP["MCP Endpoint"]
end
CLIENT --> GATEWAY
GATEWAY --> AUTH
GATEWAY --> ADMIN
GATEWAY --> RAG
GATEWAY --> PROXY
PROXY -. "Configured routing" .-> CHAT
PROXY -. "Configured routing" .-> INT
INT --> WEBHOOK
INT --> OAUTH
INT --> MCP
classDef client fill:#E8EAF6,stroke:#5C6BC0,color:#1A237E,stroke-width:1.5px
classDef gateway fill:#EDE7F6,stroke:#7E57C2,color:#311B92,stroke-width:2px
classDef route fill:#E3F2FD,stroke:#42A5F5,color:#0D47A1,stroke-width:1px
classDef service fill:#E0F2F1,stroke:#26A69A,color:#004D40,stroke-width:1.5px
classDef protocol fill:#FFF3E0,stroke:#FB8C00,color:#7F3100,stroke-width:1px
class CLIENT client
class GATEWAY gateway
class AUTH,ADMIN,RAG,PROXY route
class CHAT,INT service
class WEBHOOK,OAUTH,MCP protocol
style GW fill:transparent,stroke:#9FA8DA,stroke-width:1.5px
style SERVICES fill:transparent,stroke:#80CBC4,stroke-width:1.5px
style EXT fill:transparent,stroke:#FFCC80,stroke-width:1.5px
Diagram compatibility
The diagram uses standard Mermaid flowchart syntax, classDef, and style directives. If your Zensical theme or Mermaid version overrides node text colors, test the rendered diagram in both light and dark modes before publishing.
3. REST API gateway¶
Source root: rest_api/package/app/
3.1 Health and root¶
| Method | Path | Purpose |
|---|---|---|
GET |
/health |
Gateway health response |
GET |
/ |
Gateway root response |
Confirm the effective health and root URLs in the running deployment, including any configured route prefix.
3.2 Authentication¶
Source: rest_api/package/app/api/auth.py
| Method | Path | Purpose |
|---|---|---|
POST |
/api/auth/register |
Register a user |
POST |
/api/auth/login |
Authenticate a user |
POST |
/api/auth/refresh |
Refresh authentication tokens |
POST |
/api/auth/logout |
Log out by deleting a refresh-token record |
3.3 Profile¶
Source: rest_api/package/app/api/profile.py
| Method | Path | Purpose |
|---|---|---|
GET |
/api/profile |
Retrieve the current user's profile |
PUT |
/api/profile |
Update the current user's profile |
PUT |
/api/profile/password |
Change the current user's password |
3.4 Sessions¶
Source: rest_api/package/app/api/session.py
| Method | Path | Purpose |
|---|---|---|
POST |
/api/session |
Create a session |
GET |
/api/session/sessions |
List sessions |
GET |
/api/session/{session_id} |
Retrieve a session |
GET |
/api/session/{session_id}/history |
Retrieve session history |
PATCH |
/api/session/{session_id} |
Rename or update a session |
DELETE |
/api/session/{session_id} |
Delete a session |
3.5 Administration¶
Source: rest_api/package/app/api/admin.py
| Method | Path | Purpose |
|---|---|---|
GET |
/api/admin/users |
List users |
PUT |
/api/admin/users/{user_id}/role |
Update a user's role |
DELETE |
/api/admin/users/{user_id} |
Deactivate or delete a user, as implemented |
Administrative access
These routes perform privileged operations. Verify role enforcement against the gateway authorization table, route dependencies, and negative authorization tests. Do not rely on the URL path or frontend visibility as an access-control mechanism.
3.6 Retrieval-augmented generation (RAG)¶
Source: rest_api/package/app/api/rag.py
| Method | Path | Purpose |
|---|---|---|
POST |
/api/rag/ingest |
Submit content for ingestion |
POST |
/api/rag/ingest/file |
Submit a file for ingestion |
POST |
/api/rag/search |
Search indexed content |
GET |
/api/rag/documents |
List documents |
DELETE |
/api/rag/document/{doc_id} |
Delete a document |
POST |
/api/rag/document/{doc_id}/publish |
Publish a document |
Ingestion, deletion, and publication may change application state. Verify document ownership, ingestion validation, publication semantics, and applicable permissions in the handlers.
3.7 Chat and proxy routing¶
Sources:
rest_api/package/app/api/chat.pyrest_api/package/app/api/proxy.pyrest_api/package/app/main.py
The gateway defines a chat router with a /chat prefix and a catch-all proxy route accepting GET, POST, DELETE, PUT, and PATCH requests under the gateway API prefix.
The proxy is registered after the other routers. The effective downstream destination depends on its routing logic and configuration.
Catch-all proxy review
Confirm route precedence, allowed upstream destinations, forwarded headers, authentication propagation, and permitted HTTP methods. Ensure that the proxy cannot be used to bypass gateway authorization or reach unintended internal services.
4. Chat service¶
Sources:
chat/package/app/main.pychat/package/app/handlers/chat_handlers.py
The service router is registered under /api/chat-svc.
| Method | Path | Purpose |
|---|---|---|
POST |
/api/chat-svc/stream |
Stream chat responses |
GET |
/api/chat-svc/ping |
Service ping |
POST |
/api/chat-svc/internal/dispatch |
Internal tool dispatch |
POST |
/api/chat-svc/internal/dispatch/call |
Internal dispatch call |
GET |
/api/chat-svc/tools/schemas |
Retrieve tool schemas |
GET |
/api/chat-svc/health/plugins |
Plugin health information |
GET |
/api/chat-svc/plugins |
List plugins |
POST |
/api/chat-svc/plugins/{plugin_name}/connect |
Connect a plugin |
DELETE |
/api/chat-svc/plugins/{plugin_name}/connect |
Disconnect a plugin |
Internal route names are not security controls
The internal path segment indicates intended usage, not proven access restrictions. Verify caller authentication, service-to-service authorization, network exposure, and whether internal dispatch can execute operations outside the permitted policy.
5. Integrations service¶
Source: integrations/package/app/handlers/integration_handlers.py
The integration router is registered under /api/integrations-svc.
The following tabs group the documented integration routes by provider. They are navigation aids; each table remains a source-derived inventory.
| Method | Path | Purpose |
|---|---|---|
GET |
/api/integrations-svc/ping |
Service ping |
GET |
/api/integrations-svc/status |
Retrieve integration status |
PUT |
/api/integrations-svc/connections/{plugin_name} |
Update an integration connection status |
| Method | Path | Purpose |
|---|---|---|
GET |
/api/integrations-svc/jira/auth |
Start Jira OAuth |
GET |
/api/integrations-svc/jira/callback |
Handle Jira OAuth callback |
GET |
/api/integrations-svc/jira/projects |
List Jira projects |
GET |
/api/integrations-svc/jira/issues |
Search or list Jira issues |
GET |
/api/integrations-svc/jira/issue/{issue_key} |
Retrieve a Jira issue |
POST |
/api/integrations-svc/jira/issue |
Create a Jira issue |
| Method | Path | Purpose |
|---|---|---|
GET |
/api/integrations-svc/slack/auth |
Start Slack OAuth |
GET |
/api/integrations-svc/slack/callback |
Handle Slack OAuth callback |
GET |
/api/integrations-svc/slack/channels |
List Slack channels |
GET |
/api/integrations-svc/slack/history |
Retrieve channel history |
POST |
/api/integrations-svc/slack/message |
Send a Slack message |
| Method | Path | Purpose |
|---|---|---|
GET |
/api/integrations-svc/teams/auth |
Start Teams OAuth |
GET |
/api/integrations-svc/teams/callback |
Handle Teams OAuth callback |
GET |
/api/integrations-svc/teams/teams |
List teams |
GET |
/api/integrations-svc/teams/channels |
List team channels |
GET |
/api/integrations-svc/teams/messages |
Retrieve channel messages |
GET |
/api/integrations-svc/teams/token |
Retrieve a Teams token through the integration handler |
GET |
/api/integrations-svc/teams/me |
Retrieve current-user information |
GET |
/api/integrations-svc/teams/members |
List team members |
GET |
/api/integrations-svc/teams/search |
Search Teams messages |
POST |
/api/integrations-svc/teams/message |
Send a Teams message |
Token-bearing endpoint
Verify the authorization requirements, token response contents, caller scope, and logging behaviour of /teams/token. Avoid returning access tokens to callers that do not need them.
| Method | Path | Purpose |
|---|---|---|
GET |
/api/integrations-svc/gmail/auth |
Start Gmail OAuth |
GET |
/api/integrations-svc/gmail/callback |
Handle Gmail OAuth callback |
GET |
/api/integrations-svc/gmail/inbox |
Retrieve inbox messages |
GET |
/api/integrations-svc/gmail/search |
Search Gmail messages |
GET |
/api/integrations-svc/gmail/message/{message_id} |
Retrieve a message |
GET |
/api/integrations-svc/gmail/thread/{thread_id} |
Retrieve a thread |
GET |
/api/integrations-svc/gmail/message/{message_id}/attachments |
List message attachments |
GET |
/api/integrations-svc/gmail/message/{message_id}/attachment/{attachment_id} |
Download an attachment |
GET |
/api/integrations-svc/gmail/labels |
List labels |
GET |
/api/integrations-svc/gmail/label/{label} |
Retrieve label statistics |
GET |
/api/integrations-svc/gmail/stats |
Retrieve inbox statistics |
GET |
/api/integrations-svc/gmail/health |
Check Gmail integration health |
GET |
/api/integrations-svc/gmail/drafts |
List drafts |
POST |
/api/integrations-svc/gmail/draft |
Create a draft |
POST |
/api/integrations-svc/gmail/send |
Send an email |
POST |
/api/integrations-svc/gmail/reply |
Reply to an email |
POST |
/api/integrations-svc/gmail/forward |
Forward an email |
POST |
/api/integrations-svc/gmail/labels/modify |
Modify message labels |
POST |
/api/integrations-svc/gmail/message/{message_id}/read |
Mark a message as read |
POST |
/api/integrations-svc/gmail/message/{message_id}/unread |
Mark a message as unread |
POST |
/api/integrations-svc/gmail/message/{message_id}/archive |
Archive a message |
POST |
/api/integrations-svc/gmail/message/{message_id}/trash |
Move a message to trash |
POST |
/api/integrations-svc/gmail/message/{message_id}/star |
Change message star state |
The max_results, search, and other query parameters should be documented alongside their request schemas in a dedicated Gmail API reference.
| Method | Path | Purpose |
|---|---|---|
GET |
/api/integrations-svc/google_cal/auth |
Start Google Calendar OAuth |
GET |
/api/integrations-svc/google_cal/callback |
Handle Google Calendar OAuth callback |
GET |
/api/integrations-svc/google_cal/events |
List calendar events |
POST |
/api/integrations-svc/google_cal/events |
Create a calendar event |
DELETE |
/api/integrations-svc/google_cal/events/{event_id} |
Delete a calendar event |
| Method | Path | Purpose |
|---|---|---|
GET |
/api/integrations-svc/google_drive/auth |
Start Google Drive OAuth |
GET |
/api/integrations-svc/google_drive/callback |
Handle Google Drive OAuth callback |
GET |
/api/integrations-svc/google_drive/files |
List or search files |
GET |
/api/integrations-svc/google_drive/file/{file_id} |
Retrieve file information or content |
GET |
/api/integrations-svc/google_drive/search |
Search files |
POST |
/api/integrations-svc/google_drive/files/create |
Create a file |
PATCH |
/api/integrations-svc/google_drive/file/{file_id} |
Update a file |
POST |
/api/integrations-svc/google_drive/file/{file_id}/copy |
Copy a file |
PATCH |
/api/integrations-svc/google_drive/file/{file_id}/move |
Move a file |
GET |
/api/integrations-svc/google_drive/file/{file_id}/permissions |
List file permissions |
POST |
/api/integrations-svc/google_drive/file/{file_id}/permissions |
Create a file permission |
DELETE |
/api/integrations-svc/google_drive/file/{file_id}/permissions/{permission_id} |
Delete a file permission |
6. Webhook endpoints¶
Source: integrations/package/app/handlers/webhook_handlers.py
The webhook router is registered under /api/integrations-svc.
| Method | Path | Purpose |
|---|---|---|
POST |
/api/integrations-svc/webhooks/jira |
Receive Jira webhook events |
POST |
/api/integrations-svc/webhooks/slack |
Receive Slack webhook events |
POST |
/api/integrations-svc/webhooks/teams |
Receive Teams webhook events |
The source declares signature-related headers for some webhook handlers. Header declarations alone do not prove that signatures are validated.
Webhook verification checklist
Before exposing webhook routes, verify:
- Signature or token verification is implemented and enforced.
- Invalid and missing signatures are rejected.
- Replay protection and timestamp validation are appropriate to the provider.
- Payload sizes and content types are constrained.
- Duplicate deliveries are handled safely where necessary.
- Secrets and sensitive payloads are not written to application logs.
7. OAuth and MCP endpoints¶
Sources:
integrations/package/app/mcp/oauth.pyintegrations/package/app/mcp/server.py
These routers are registered separately from the /api/integrations-svc prefix.
| Method | Path | Purpose |
|---|---|---|
GET |
/.well-known/oauth-authorization-server |
OAuth authorization-server metadata |
GET |
/.well-known/oauth-protected-resource |
Protected-resource metadata |
GET |
/oauth/authorize |
Start the MCP OAuth authorization flow |
GET |
/oauth/google/callback |
Handle the Google OAuth callback for the MCP flow |
POST |
/oauth/token |
Exchange an OAuth authorization code for a token |
POST |
/mcp |
MCP protocol endpoint |
GET |
/mcp/health |
MCP health response |
These paths belong to the integrations service. Their public reachability depends on service exposure and deployment routing.
OAuth and token security
Verify redirect URI validation, state and CSRF protections, authorization-code handling, token expiration, scope enforcement, credential storage, and secret-safe logging. Confirm that metadata and health endpoints expose no sensitive configuration.
8. Read-only audit classification¶
This classification is a preliminary assessment based on route names and HTTP methods. It is not a complete handler-level security review.
| Category | Examples | Initial assessment |
|---|---|---|
| Retrieval | List, search, get, history, and metadata routes | Read-oriented by name; verify side effects and access controls. |
| OAuth and connection management | /auth, /callback, /connections/{plugin_name} |
May establish or update connection state. |
| Messaging and issue mutations | Email send/reply, Slack or Teams messaging, Jira issue creation | Write-capable. |
| Calendar mutations | Event creation and deletion | Write-capable. |
| Drive mutations | File creation, update, copy, move, and permission changes | Write-capable. |
| User and session mutations | Profile updates, role changes, session deletion | State-changing. |
| Document management | Ingestion, publication, and deletion | State-changing. |
Read-only policy is a server-side requirement
If WhiteLotusAI is configured for read-only integrations, the restriction must be enforced server-side across every relevant route, tool registry entry, internal dispatch path, and alternate entry point.
Hiding write actions in the frontend or relying on an AI model to avoid them is insufficient. This inventory does not claim that the listed write-capable routes are disabled.
9. Open findings and verification plan¶
| ID | Finding | Evidence required |
|---|---|---|
API-INV-01 |
Public gateway exposure of downstream routes is not established by route definitions alone. | Proxy configuration and deployment-level route verification. |
API-INV-02 |
Authentication and authorization have not been independently verified for every endpoint. | Route dependencies, middleware, authorization tables, and tests. |
API-INV-03 |
Read-only restrictions have not been verified across write-capable endpoints and alternate entry points. | Server-side enforcement review and negative tests. |
API-INV-04 |
Request and response schemas are not fully captured. | Handler signatures, Pydantic models, and generated schemas. |
API-INV-05 |
Webhook authenticity and replay protections require verification. | Signature-validation implementation and tests. |
API-INV-06 |
Token-bearing and OAuth routes require detailed access-control and logging review. | Authentication code, response schemas, and logging paths. |
API-INV-07 |
Runtime reachability and behaviour have not been tested for every route. | Environment-specific smoke tests and integration tests. |
Recommended verification sequence¶
- Inventory source registrations: Confirm routers, prefixes, HTTP methods, and route registration order.
- Inspect authorization: Trace authentication middleware, dependencies, role checks, and service-to-service credentials.
- Audit mutations: Identify all state-changing handlers, including indirect effects and alternate tool-dispatch paths.
- Validate schemas: Record required parameters, request bodies, response models, status codes, and error responses.
- Test deployed routes: Verify expected success and failure behaviour in a controlled environment.
- Record evidence: Update the findings table only when source inspection or reproducible tests support a conclusion.
Definition of verified
Mark an endpoint as verified only when its route registration, intended access policy, handler behaviour, and relevant tests have been examined. Record runtime verification separately from source inspection.
10. Source locations¶
The following paths are the primary source locations referenced by this inventory.
Gateway source files
rest_api/package/app/main.pyrest_api/package/app/api/base.pyrest_api/package/app/api/auth.pyrest_api/package/app/api/profile.pyrest_api/package/app/api/session.pyrest_api/package/app/api/admin.pyrest_api/package/app/api/rag.pyrest_api/package/app/api/chat.pyrest_api/package/app/api/proxy.py
Chat service source files
chat/package/app/main.pychat/package/app/handlers/chat_handlers.py
Integrations source files
integrations/package/app/main.pyintegrations/package/app/handlers/integration_handlers.pyintegrations/package/app/handlers/webhook_handlers.pyintegrations/package/app/mcp/oauth.pyintegrations/package/app/mcp/server.py
11. Maintenance¶
Update this inventory when routes are added, removed, renamed, or moved between services. Recheck route prefixes and deployment routing when API_ROOT, gateway proxy configuration, service ports, or reverse-proxy rules change.
For a complete API contract, complement this document with generated OpenAPI specifications and endpoint-level documentation covering request and response schemas, authentication requirements, error codes, and examples.
Document classification: Engineering reference · Source-derived · Runtime verification pending