Interactive API Reference
The ChronosVector REST API is documented using the OpenAPI 3.1 specification, auto-generated from Rust source code via utoipa.
Swagger UI
Section titled “Swagger UI”The interactive API explorer is available at /swagger-ui when the server is running.
# Start the servercargo run -p cvx-server
# Open in browseropen http://localhost:3000/swagger-uiEndpoints Overview
Section titled “Endpoints Overview”| Method | Path | Description |
|---|---|---|
POST | /v1/ingest | Batch ingest temporal points |
| Method | Path | Description |
|---|---|---|
POST | /v1/query | Spatiotemporal kNN search |
GET | /v1/entities/{id}/trajectory | Entity trajectory retrieval |
POST | /v1/analogy | Temporal analogy: B@t3 + (A@t2 - A@t1) |
| Method | Path | Description |
|---|---|---|
GET | /v1/entities/{id}/velocity | Velocity at timestamp |
GET | /v1/entities/{id}/drift | Drift quantification |
GET | /v1/entities/{id}/changepoints | Change point detection |
GET | /v1/entities/{id}/prediction | Predict future vector |
| Method | Path | Description |
|---|---|---|
GET | /v1/health | Health check |
GET | /v1/ready | Readiness probe |
Quick Examples
Section titled “Quick Examples”Ingest a batch of points
Section titled “Ingest a batch of points”curl -X POST http://localhost:3000/v1/ingest \ -H "Content-Type: application/json" \ -d '{ "points": [ {"entity_id": 1, "timestamp": 1000000, "vector": [0.1, 0.2, 0.3]}, {"entity_id": 1, "timestamp": 2000000, "vector": [0.4, 0.5, 0.6]} ] }'Spatiotemporal kNN search
Section titled “Spatiotemporal kNN search”curl -X POST http://localhost:3000/v1/query \ -H "Content-Type: application/json" \ -d '{ "vector": [0.1, 0.2, 0.3], "k": 5, "alpha": 0.8, "query_timestamp": 1500000, "filter": {"type": "range", "start": 1000000, "end": 3000000} }'Get entity velocity
Section titled “Get entity velocity”curl "http://localhost:3000/v1/entities/1/velocity?timestamp=1500000"Predict future state
Section titled “Predict future state”curl "http://localhost:3000/v1/entities/1/prediction?target_timestamp=5000000"OpenAPI Spec
Section titled “OpenAPI Spec”The raw OpenAPI JSON spec is available at:
- Runtime:
GET /api-docs/openapi.json(from running server) - Static:
/openapi.json(bundled with docs) - Generate:
cargo run -p cvx-api --bin gen_openapi