REST API Overview

parallax-server exposes a REST HTTP API over Axum. All responses are JSON.

Base URL

http://localhost:7700   (default)

Configure with --host and --port flags or the PARALLAX_HOST / PARALLAX_PORT environment variables.

Versioning

All endpoints are prefixed with /v1/. The version is part of the URL path, not a header.

Endpoint Summary

MethodPathDescription
GET/v1/healthHealth check (auth-exempt)
GET/v1/statsEntity and relationship counts
POST/v1/queryExecute a PQL query
GET/v1/entities/:idFetch an entity by ID
GET/v1/relationships/:idFetch a relationship by ID
POST/v1/ingest/syncConnector sync batch
POST/v1/ingest/writeDirect write batch
GET/v1/connectorsList registered connectors
POST/v1/connectors/:id/syncTrigger a connector sync
GET/metricsPrometheus metrics exposition

Content Type

All request bodies must be Content-Type: application/json. All responses have Content-Type: application/json (except /metrics).

Request IDs

Every request receives a X-Request-Id header in the response (INV-A05). The server either generates a UUID v4 or propagates the value from the incoming request's X-Request-Id header. Use this for log correlation.

curl -v http://localhost:7700/v1/health
# < X-Request-Id: 550e8400-e29b-41d4-a716-446655440000

Common Response Codes

StatusMeaning
200 OKSuccess
400 Bad RequestInvalid request body or parameters
401 UnauthorizedMissing or invalid API key
404 Not FoundEntity/relationship not found
500 Internal Server ErrorStorage or processing error

Starting the Server

# No auth (development)
parallax serve --data-dir ./data

# With API key
PARALLAX_API_KEY=my-secret-key parallax serve --data-dir ./data

# Custom host and port
parallax serve --host 0.0.0.0 --port 8080 --data-dir /var/lib/parallax