Complete API Reference
This reference maps every public route currently matched by ResolveHttpRoute() in src/api/httproutes.cpp to its route action and dispatch handler.
The HTTP server dispatches route actions in src/api/httpserver.cpp through ProcessRequestWithAPI(). Handlers are methods on SearchAPI, declared in include/api/searchapi.h and implemented across src/api/*.cpp.
Route Resolution Rules
- Query strings are removed before matching.
- A single trailing slash is removed before matching.
- Route matching is method-sensitive.
- Collection routes are parsed as path segments, so
/collections/{collection}/documents/{id}and/collections/{collection}/documents/searchare distinct routes. /collections/{collection}/searchis a vector search alias, not the same route as/collections/{collection}/documents/search.
System, Health, and Runtime
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET | / | Status | HandleStatus() | Root maps to status. |
| GET | /status | Status | HandleStatus() | Server status. |
| GET | /query | Status | HandleStatus() | Status alias. |
| ANY | /health | Health | HandleHealth() | Health check. Clients should use GET. |
| GET | /ready | Ready | HandleReady() | Readiness check. |
| GET | /ping | Ping | HandlePing() | Lightweight ping. |
| GET | /startup | Startup | HandleStartup() | Startup report. |
| GET | /boot-status | Startup | HandleStartup() | Startup report alias. |
| GET | /stats | Stats | HandleStats() | Server statistics. |
| GET | /metrics | Metrics | HandleMetrics() | JSON metrics. |
| GET | /metrics.json | Metrics | HandleMetrics() | Metrics alias. |
| GET | /metrics/history | MetricsHistory | HandleMetricsHistory() | Historical metrics. |
| GET | /metrics-history | MetricsHistory | HandleMetricsHistory() | Historical metrics alias. |
| GET | /connections | Connections | HandleConnections() | Active connections. |
| GET | /doctotal | DocTotal | HandleDocTotal() | Total document count. |
| GET | /etc | Etc | HandleEtc() | Protocol metadata. |
| GET | /cache | Cache | HandleCache() | Cache statistics. |
| GET | /search-config | SearchConfig | HandleSearchConfig() | Search configuration. |
| GET | /config-files | ConfigFiles | HandleConfigFiles() | Active configuration files. |
Storage and Maintenance
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET | /rocksdb | RocksDB | HandleRocksDB() | RocksDB status. |
| GET | /_rocksdb | RocksDB | HandleRocksDB() | RocksDB status alias. |
| GET | /admin/storage_status | StorageStatus | HandleStorageStatus() | Admin-only storage status. |
| GET/POST | /update-counters | UpdateCounters | HandleUpdateCounters() | Recompute counters. |
| GET | /debug/counters | DebugCounters | HandleDebugCounters() | Counter diagnostics. |
| GET/POST | /repair | Repair | HandleRepair() | Repair checks. |
| GET | /integrity | Integrity | HandleIntegrity() | Integrity report. |
| GET | /consistency | Integrity | HandleIntegrity() | Integrity alias. |
| GET | /self-check | SelfCheck | HandleSelfCheck() | Runtime self-check. |
| POST | /flush | Flush | HandleFlush() | Admin-only and destructive. |
| GET | /presets | ListPresets | HandleListPresets() | List search presets. |
| POST/PUT | /presets/{preset} | UpsertPreset | HandleCreateOrUpdatePreset() | Create or update search preset. |
| GET | /presets/{preset} | GetPreset | HandleGetPreset() | Get search preset. |
| DELETE | /presets/{preset} | DeletePreset | HandleDeletePreset() | Delete search preset. |
Collections
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET | /collections | ListCollections | HandleListCollections() | List collections. |
| POST | /collections | CreateCollection | HandleCreateCollection() | Create collection. |
| GET | /collections/distributed | ListCollectionsDistributed | HandleListCollectionsDistributed() | Includes configured links. |
| GET | /collections/{collection} | GetCollection | HandleGetCollection() | Collection details. |
| DELETE | /collections/{collection} | DeleteCollection | HandleDeleteCollection() | Delete collection. |
| GET | /collections/{collection}/lang | GetCollectionLanguage | HandleGetCollectionLanguage() | Collection language. |
| POST | /collections/{collection}/update | UpdateCollection | HandleUpdateCollection() | Update schema. |
Documents
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET | /collections/{collection}/documents | ListDocuments | HandleListDocuments() | List documents. |
| POST | /collections/{collection}/documents | AddDocument | HandleAddDocument() | Add document. |
| DELETE | /collections/{collection}/documents | DeleteDocumentsByFilter | HandleDeleteDocumentsByFilter() | Delete by filter. |
| POST | /collections/{collection}/documents/import | BulkImportDocuments | HandleBulkImportDocuments() | Bulk import. |
| GET | /collections/{collection}/documents/{id} | GetDocument | HandleGetDocument() | Get document. |
| PUT | /collections/{collection}/documents/{id} | UpdateDocument | HandleUpdateDocument() | Update document. |
| DELETE | /collections/{collection}/documents/{id} | DeleteDocument | HandleDeleteDocument() | Delete document. |
| GET | /collections/{collection}/documents/{id}/context | GetDocumentContext | HandleGetDocumentContext() | Surrounding context. |
| POST | /collections/{collection}/documents/_update_by_query | UpdateByQuery | HandleUpdateByQuery() | Update matching documents. |
| POST | /collections/{collection}/documents/_delete_by_query | DeleteByQuery | HandleDeleteByQuery() | Delete matching documents. |
Search
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET/POST | /collections/{collection}/documents/search | DocumentSearch | HandleSearch() | Lexical or hybrid search. |
| GET/POST | /collections/{collection}/documents/facet_counts | FacetCounts | HandleFacetCounts() | Facet counts. |
| GET/POST | /collections/{collection}/documents/export | ExportDocuments | HandleExportDocuments() | Export documents. |
| GET/POST | /collections/{collection}/documents/maybe | MaybeSuggest | HandleMaybe() | Query suggestions. |
| GET/POST | /collections/{collection}/vector_search | VectorSearch | HandleVectorSearch() | Dedicated vector endpoint. |
| GET/POST | /collections/{collection}/search | VectorSearch | HandleVectorSearch() | Vector endpoint alias. |
| GET/POST | /multi_search | MultiSearch | HandleMultiSearch() | Multiple searches in one request. |
| GET/POST | /search | GlobalSearch | HandleGlobalSearch() | Global search. |
| GET/POST | /sql | DocumentSearch | HandleSearch() | SQL-style entry point. |
Synonyms
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET | /synonyms | ListAllSynonyms | HandleListAllSynonyms() | All synonyms summary. |
| GET | /synonym_sets | ListAllSynonyms | HandleListAllSynonyms() | All synonyms alias. |
| GET | /synonyms/global | ListGlobalSynonyms | HandleListGlobalSynonyms() | Global synonyms. |
| GET | /synonym_sets/global | ListGlobalSynonyms | HandleListGlobalSynonyms() | Global synonyms alias. |
| POST/PUT | /synonyms/global/{id} | UpsertGlobalSynonym | HandleCreateOrUpdateGlobalSynonym() | Create or update global synonym. |
| POST/PUT | /synonym_sets/global/{id} | UpsertGlobalSynonym | HandleCreateOrUpdateGlobalSynonym() | Create or update global synonym alias. |
| POST/PUT | /synonym_sets/global/items/{id} | UpsertGlobalSynonym | HandleCreateOrUpdateGlobalSynonym() | Create or update global synonym item alias. |
| GET | /synonyms/global/{id} | GetGlobalSynonym | HandleGetGlobalSynonym() | Get global synonym. |
| GET | /synonym_sets/global/{id} | GetGlobalSynonym | HandleGetGlobalSynonym() | Get global synonym alias. |
| GET | /synonym_sets/global/items/{id} | GetGlobalSynonym | HandleGetGlobalSynonym() | Get global synonym item alias. |
| DELETE | /synonyms/global/{id} | DeleteGlobalSynonym | HandleDeleteGlobalSynonym() | Delete global synonym. |
| DELETE | /synonym_sets/global/{id} | DeleteGlobalSynonym | HandleDeleteGlobalSynonym() | Delete global synonym alias. |
| DELETE | /synonym_sets/global/items/{id} | DeleteGlobalSynonym | HandleDeleteGlobalSynonym() | Delete global synonym item alias. |
| GET | /collections/{collection}/synonyms | ListSynonyms | HandleListSynonyms() | Collection synonyms. |
| GET | /collections/{collection}/synonym_sets | ListSynonyms | HandleListSynonyms() | Collection synonyms alias. |
| POST/PUT | /collections/{collection}/synonyms/{id} | UpsertSynonym | HandleCreateOrUpdateSynonym() | Create or update synonym. |
| POST/PUT | /collections/{collection}/synonym_sets/{id} | UpsertSynonym | HandleCreateOrUpdateSynonym() | Create or update synonym alias. |
| GET | /collections/{collection}/synonyms/{id} | GetSynonym | HandleGetSynonym() | Get synonym. |
| GET | /collections/{collection}/synonym_sets/{id} | GetSynonym | HandleGetSynonym() | Get synonym alias. |
| DELETE | /collections/{collection}/synonyms/{id} | DeleteSynonym | HandleDeleteSynonym() | Delete synonym. |
| DELETE | /collections/{collection}/synonym_sets/{id} | DeleteSynonym | HandleDeleteSynonym() | Delete synonym alias. |
Stopwords
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET | /stopwords | ListAllStopwords | HandleListAllStopwords() | All stopwords summary. |
| GET | /stopword_sets | ListAllStopwords | HandleListAllStopwords() | All stopwords alias. |
| GET | /stopwords/global | ListGlobalStopwords | HandleListGlobalStopwords() | Global stopwords. |
| GET | /stopword_sets/global | ListGlobalStopwords | HandleListGlobalStopwords() | Global stopwords alias. |
| POST | /stopwords/global | CreateGlobalStopword | HandleCreateGlobalStopword() | Add global stopword. |
| POST | /stopword_sets/global | CreateGlobalStopword | HandleCreateGlobalStopword() | Add global stopword alias. |
| DELETE | /stopwords/global/{word} | DeleteGlobalStopword | HandleDeleteGlobalStopword() | Delete global stopword. |
| DELETE | /stopword_sets/global/{word} | DeleteGlobalStopword | HandleDeleteGlobalStopword() | Delete global stopword alias. |
| DELETE | /stopword_sets/global/items/{word} | DeleteGlobalStopword | HandleDeleteGlobalStopword() | Delete global stopword item alias. |
| GET | /collections/{collection}/stopwords | ListStopwords | HandleListStopwords() | Collection stopwords. |
| GET | /collections/{collection}/stopword_sets | ListStopwords | HandleListStopwords() | Collection stopwords alias. |
| POST | /collections/{collection}/stopwords | CreateStopword | HandleCreateStopword() | Add collection stopword. |
| POST | /collections/{collection}/stopword_sets | CreateStopword | HandleCreateStopword() | Add collection stopword alias. |
| DELETE | /collections/{collection}/stopwords/{word} | DeleteStopword | HandleDeleteStopword() | Delete collection stopword. |
| DELETE | /collections/{collection}/stopword_sets/{word} | DeleteStopword | HandleDeleteStopword() | Delete collection stopword alias. |
Overrides and Aliases
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET | /collections/{collection}/overrides | ListOverrides | HandleListOverrides() | Collection overrides. |
| GET | /collections/{collection}/curations | ListOverrides | HandleListOverrides() | Collection curation alias. |
| GET | /collections/{collection}/curation_sets | ListOverrides | HandleListOverrides() | Collection curation alias. |
| POST/PUT | /collections/{collection}/overrides/{id} | UpsertOverride | HandleCreateOrUpdateOverride() | Create or update override. |
| POST/PUT | /collections/{collection}/curations/{id} | UpsertOverride | HandleCreateOrUpdateOverride() | Create or update curation alias. |
| POST/PUT | /collections/{collection}/curation_sets/{id} | UpsertOverride | HandleCreateOrUpdateOverride() | Create or update curation alias. |
| GET | /collections/{collection}/overrides/{id} | GetOverride | HandleGetOverride() | Get override. |
| GET | /collections/{collection}/curations/{id} | GetOverride | HandleGetOverride() | Get curation alias. |
| GET | /collections/{collection}/curation_sets/{id} | GetOverride | HandleGetOverride() | Get curation alias. |
| DELETE | /collections/{collection}/overrides/{id} | DeleteOverride | HandleDeleteOverride() | Delete override. |
| DELETE | /collections/{collection}/curations/{id} | DeleteOverride | HandleDeleteOverride() | Delete curation alias. |
| DELETE | /collections/{collection}/curation_sets/{id} | DeleteOverride | HandleDeleteOverride() | Delete curation alias. |
| GET | /aliases | ListAliases | HandleListAliases() | List aliases. |
| GET | /collections/{collection}/aliases | ListAliases | HandleListAliases() | Filter aliases by collection. |
| POST/PUT | /aliases/{alias} | UpsertAlias | HandleCreateOrUpdateAlias() | Create or update alias. |
| GET | /aliases/{alias} | GetAlias | HandleGetAlias() | Get alias. |
| DELETE | /aliases/{alias} | DeleteAlias | HandleDeleteAlias() | Delete alias. |
Users and Keys
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET | /users | ListUsers | HandleListUsers() | Admin-only. |
| POST | /users | CreateUser | HandleCreateUser() | Admin-only. |
| GET | /users/{name} | GetUser | HandleGetUser() | Admin-only. |
| PUT | /users/{name} | UpdateUser | HandleUpdateUser() | Admin-only. |
| DELETE | /users/{name} | DeleteUser | HandleDeleteUser() | Admin-only. |
| GET | /keys | ListKeys | HandleListKeys() | Admin-only. |
| POST | /keys | CreateKey | HandleCreateKey() | Admin-only. |
| GET | /keys/{id} | GetKey | HandleGetKey() | Admin-only. |
| PUT | /keys/{id} | UpdateKey | HandleUpdateKey() | Admin-only. |
| DELETE | /keys/{id} | DeleteKey | HandleDeleteKey() | Admin-only. |
Links, Modules, and Analytics
| Method | Path | Route action | Handler | Notes |
|---|---|---|---|---|
| GET | /links | LinksList | HandleLinksList() | Cluster links. |
| GET | /links/ping | LinksPing | HandleLinksPing() | Ping cluster links. |
| POST | /links/connect | LinksConnect | HandleLinksConnect() | Add runtime link. |
| POST | /links/disconnect | LinksDisconnect | HandleLinksDisconnect() | Remove runtime link. |
| GET | /modules | ListModules | HandleListModules() | Loaded modules. |
| POST | /loadmodule | ModuleAPI | HandleModuleAPI() | Load module by body. |
| POST | /loadmodule/{module} | ModuleAPI | HandleModuleAPI() | Load module by path. |
| POST | /unloadmodule | ModuleAPI | HandleModuleAPI() | Unload module by body. |
| POST | /unloadmodule/{module} | ModuleAPI | HandleModuleAPI() | Unload module by path. |
| GET | /modules/{module}/syntax | GetModuleSyntax | HandleModuleSyntax() | Module syntax. |
| GET/POST/PUT/DELETE | /modules/{module}/... | ModuleAPI | HandleModuleAPI() | Module-specific routes. |
| POST | /analytics/click | AnalyticsClick | HandleAnalyticsClick() | Click analytics. |
Dispatch Flow
HttpConnection::ProcessRequest()parses the request.- CORS and authentication checks run before handler dispatch.
ResolveHttpRoute()returns aRouteAction.- Sync and metadata readiness gates may block selected operations.
ProcessRequestWithAPI()calls the matchingSearchAPI::Handle*()method.- The handler returns an
HttpResponsewith JSON when possible.
Common Path Parameters
| Parameter | Meaning |
|---|---|
{collection} | Collection name. |
{id} | Document, synonym, override, or key identifier depending on route family. |
{word} | Stopword value. |
{alias} | Alias name. |
{module} | Module name. |
{name} | User name for /users/{name}. |
Common Query Parameters
| Parameter | Description |
|---|---|
offset | Number of records to skip. |
limit | Maximum records to return. |
page | Page number for handlers that support page-style pagination. |
per_page | Page size for handlers that support page-style pagination. |
q | Query text. |
query_by | Comma-separated searchable fields. |
filter_by | Filter expression, including geo predicates such as _geo_radius(...) and _geo_box(...). |
sort_by | Sort expression, including _geo_distance(field, lat, lon):asc|desc. |
facet_by | Comma-separated facet fields. |
geo_radius | Shorthand for _geo_radius(field, lat, lon, radius) search filtering. |
geo_box | Shorthand for _geo_box(field, top_left_lat, top_left_lon, bottom_right_lat, bottom_right_lon) search filtering. |
geo_sort | Shorthand for _geo_distance(field, lat, lon):asc sorting. |
distributed | Search execution override: on, off, local, remote, or force where supported. |