Expand description
VelesDB Server - REST API library for the VelesDB vector database.
This module provides the HTTP handlers and types for the VelesDB REST API.
§OpenAPI Documentation
The API is documented using OpenAPI 3.0. Access the interactive documentation at:
- Swagger UI:
GET /swagger-ui - OpenAPI JSON:
GET /api-docs/openapi.json
Modules§
- auth
- API key authentication middleware.
- config
- Server configuration module.
- explain
- EXPLAIN query handler and plan building logic.
- match_
query - MATCH query handler for REST API (EPIC-045 US-007).
- query
- VelesQL query execution handlers.
- search
- Search handlers for vector similarity, text, and hybrid search.
- tls
- TLS configuration and server support via rustls.
Structs§
- Aggregation
Response - Response from
VelesQLaggregation query execution. - ApiDoc
- VelesDB API Documentation
- AppState
- Application state shared across handlers.
- Batch
Search Request - Request for batch vector search.
- Batch
Search Response - Response from batch search.
- Collection
Config Response - Response with detailed collection configuration.
- Collection
Response - Response with collection information.
- Collection
Stats Response - Response with collection statistics from ANALYZE.
- Column
Stats Response - Per-column statistics in a collection stats response.
- Create
Collection Request - Request to create a new collection.
- Create
Index Request - Request to create a property index.
- Degree
Response - Response for node degree query.
- Error
Response - Error response.
- Explain
Cost - Estimated cost metrics for the query.
- Explain
Features - Features detected in the query.
- Explain
Request - Request for query EXPLAIN.
- Explain
Response - Response from query EXPLAIN.
- Explain
Step - A step in the query execution plan.
- Fusion
Request - Fusion configuration for hybrid dense+sparse search.
- Guard
Rails Config Request - Request to configure query guard-rails.
- Guard
Rails Config Response - Response with current guard-rails configuration.
- Hybrid
Search Request - Request for hybrid search (vector + text).
- IdScore
Result - A single ID+score result from IDs-only search.
- Index
Response - Response with index information.
- Index
Stats Response - Per-index statistics in a collection stats response.
- List
Indexes Response - Response listing all indexes.
- Multi
Query Search Request - Request for multi-query vector search with fusion.
- Onboarding
Metrics - Lightweight counters for first-hour troubleshooting diagnostics.
- Point
Request - A point in an upsert request.
- Query
Error Detail VelesQLquery error detail.- Query
Error Response VelesQLquery error response.- Query
Request - Request for
VelesQLquery execution. - Query
Response - Response from
VelesQLquery execution. - Query
Response Meta - Metadata section for
VelesQLquery responses. - Search
IdsResponse - Response from IDs-only search (no payload hydration).
- Search
Request - Request for vector search (dense, sparse, or hybrid).
- Search
Response - Response from vector search.
- Search
Result Response - A single search result.
- Stream
Done Event - SSE event: Traversal completed.
- Stream
Insert Request - Request body for the streaming insert endpoint (single point).
- Stream
Node Event - SSE event: A node reached during traversal.
- Stream
Stats Event - SSE event: Periodic statistics update.
- Stream
Traverse Params - Query parameters for streaming graph traversal.
- Text
Search Request - Request for BM25 text search.
- Traversal
Result Item - A single traversal result item.
- Traversal
Stats - Statistics from traversal operation.
- Traverse
Request - Request for graph traversal.
- Traverse
Response - Response from graph traversal.
- Unified
Query Response - Unified response from /query endpoint.
- Upsert
Points Request - Request to upsert points.
- Velesql
Error Detail - Standardized
VelesQLsemantic/runtime error detail. - Velesql
Error Response - Standardized
VelesQLsemantic/runtime error response.
Enums§
- Query
Type - Query type for unified /query endpoint.
- Sparse
Vector Input - Input format for sparse vectors, supporting two JSON representations:
Constants§
- VELESQL_
CONTRACT_ VERSION - Canonical
VelesQLcontract version for REST responses.
Functions§
- add_
edge - Add an edge to a collection’s graph.
- aggregate
- Execute an aggregation-only VelesQL query.
- analyze_
collection - Analyze a collection, computing and persisting statistics.
- batch_
search - Batch search for multiple vectors.
- collection_
sanity - Run a quick sanity check for onboarding and troubleshooting.
- create_
collection - Create a new collection.
- create_
index - Create a property index on a graph collection.
- default_
avg_ weight - Default average weight for weighted fusion.
- default_
collection_ type - Default collection type: vector.
- default_
fusion_ strategy - Default fusion strategy: RRF.
- default_
hit_ weight - Default hit weight for weighted fusion.
- default_
index_ type - Default index type: hash.
- default_
max_ weight - Default max weight for weighted fusion.
- default_
metric - Default distance metric: cosine.
- default_
rrf_ k - Default RRF k parameter.
- default_
storage_ mode - Default storage mode: full (no quantization).
- default_
top_ k - Default number of results to return.
- default_
vector_ weight - Default vector weight for hybrid search.
- delete_
collection - Delete a collection.
- delete_
index - Delete a property index.
- delete_
point - Delete a point by ID.
- explain
- Explain a VelesQL query without executing it (EPIC-058 US-002).
- flush_
collection - Flush pending changes to disk.
- get_
collection - Get collection information.
- get_
collection_ config - Get detailed collection configuration (HNSW params, storage mode, schema, etc.).
- get_
collection_ stats - Get cached collection statistics (returns 404 if never analyzed).
- get_
edges - Get edges from a collection’s graph filtered by label.
- get_
guardrails - Get current guard-rails configuration.
- get_
node_ degree - Get the degree (in and out) of a specific node.
- get_
point - Get a point by ID.
- health_
check - Liveness probe — always returns 200 OK.
- hybrid_
search - Hybrid search combining vector similarity and BM25 text search.
- is_
empty - Check if a collection is empty.
- list_
collections - List all collections.
- list_
indexes - List all indexes on a collection.
- match_
query - Execute a MATCH query on a collection.
- mode_
to_ ef_ search - Convert search mode string to
ef_searchvalue. - multi_
query_ search - Multi-query search with fusion strategies.
- query
- Execute a VelesQL query.
- readiness_
check - Readiness probe — returns 200 when the database is fully loaded, 503 otherwise.
- search
- Search for similar vectors.
- search_
ids - Lightweight search returning only IDs and scores (no payload hydration).
- stream_
insert - Stream-insert a single point via the bounded ingestion channel.
- stream_
traverse - Stream graph traversal results via SSE.
- stream_
upsert_ points - Stream upsert points using NDJSON.
- text_
search - Search using BM25 full-text search.
- traverse_
graph - Traverse the graph using BFS or DFS from a source node.
- update_
guardrails - Update guard-rails configuration (partial update).
- upsert_
points - Upsert points to a collection.