Expand description
Data Transfer Objects (DTOs) for the cognee HTTP server.
Each file corresponds to one router family.
§Wire-convention contract (Decision 10, polarity-corrected 2026-04-29)
Every request/response DTO whose Python counterpart inherits
cognee.api.DTO.InDTO or OutDTO uses #[serde(rename_all = "camelCase")]
because Python’s alias_generator=to_camel emits camelCase on the wire.
Request DTOs additionally apply #[serde(alias = "<snake_form>")] per
multi-word field for input compatibility with Python’s
populate_by_name=True.
The rule does not apply to:
- Plain-dict response bodies built via
JSONResponse(content={...})or returned as rawdict[str, Any]from a handler (e.g. theforgetresponse variants,RememberResultDTO, the permissions response DTOs,pipeline_runinfo dicts,authuser/token responses). Their wire shape is the literal Python key names — usually snake_case — because FastAPI’sjsonable_encoderdoes not synthesize aliases for plain dicts. - Bare
BaseModelsubclasses (no alias_generator applied) such as theresponsesmodule helpers (Function,ToolCall,ChatUsage, …), the notebooksNotebookCell, thepipelines.PipelineRunInfofamily, etc. These keep snake_case literal field names on the wire. - Third-party Pydantic models from
fastapi-users(BaseUser,BaseUserUpdate,BearerResponse, …): they have no alias_generator and emit snake_case literal field names. - Query parameters declared at the FastAPI function signature — FastAPI
does not apply
alias_generatorhere. Wire name equals the Python parameter name. - Multipart form fields declared at the function signature — wire name equals the literal Python parameter name (Python intentionally mixes camelCase and snake_case for these).
- HTTP headers and URL path parameters — always literal.
The convention is enforced by the workspace test
crates/http-server/tests/test_openapi_camelcase.rs, which walks every
component schema in the generated OpenAPI document and asserts each
property name is camelCase. The whitelist there enumerates every
exception above.
Modules§
- activity
- DTOs for the
GET /api/v1/activity/*family. - add
- DTOs for
POST /api/v1/add. - api_
keys - DTOs for the api-keys router.
- auth
- DTOs for the auth router (login / logout / me).
- auth_
register - DTOs for the auth register router.
- auth_
reset_ password - DTOs for the reset-password router.
- auth_
verify - DTOs for the verify router.
- checks
- DTOs for the
/api/v1/checksfamily. - cognify
- DTOs for
POST /api/v1/cognifyandGET /api/v1/cognify/subscribe/{id}. - configuration
- DTOs for
/api/v1/configuration/*perrouters/configuration.md §4. - datasets
- DTOs for
/api/v1/datasets/*. - delete
- DTOs for
DELETE /api/v1/delete(deprecated endpoint). - forget
- DTOs for
POST /api/v1/forget. - improve
- DTOs for
POST /api/v1/improve. - llm
- DTOs for
/api/v1/llm. - memify
- DTOs for
POST /api/v1/memify. - notebooks
- DTOs for the
/api/v1/notebooksrouter. - ontologies
- DTOs for
/api/v1/ontologies. - permissions
- DTOs for
/api/v1/permissions/*perrouters/permissions.md §4. - pipeline_
run - Shared
PipelineRunInfoDTOand wire-string helpers used by all four pipeline routers (cognify, memify, remember, improve). - recall
- DTOs for
/api/v1/recall. - remember
- DTOs for
POST /api/v1/remember. - remember_
entry - Request DTO for
POST /api/v1/remember/entry(E-02). - responses
- DTOs for the
/api/v1/responsesrouter. - search
- DTOs for
/api/v1/search(and shared with/api/v1/recall). - sessions
- DTOs for
/api/v1/sessions/*(E-09 owns the list endpoint). - settings
- DTOs for
/api/v1/settings/*perrouters/settings.md §4. - sync
- DTOs for
/api/v1/syncand/api/v1/sync/status. - update
- DTOs for
PATCH /api/v1/update. - users
- Shared user DTOs (UserReadDTO, UserUpdatePayloadDTO, InvalidPasswordDetailDTO). Used by auth_register, users, and users_by_email routers.
- users_
by_ email - DTOs for the users-by-email router.
- util
- Shared deserializer utilities re-used across multiple pipeline-router DTOs.
- visualize
- DTOs for
/api/v1/visualize.