all.sourceall.source

API Reference

AllSource Core exposes a REST API on port 3900. All data endpoints use the /api/v1/ prefix.

Authentication

Requests to the Query Service (port 3902) require a Bearer token in the Authorization header. Direct Core access (port 3900) does not require authentication — it is intended for internal service-to-service communication.

Authorization: Bearer <your-api-key>

Endpoints

POST/api/v1/events

Ingest a new event into a stream.

GET/api/v1/events/query

Query events by stream, time range, entity, or event type. Returns {events, count}.

GET/api/v1/projections

List all projections. Returns {projections, total}.

GET/api/v1/schemas

List registered event schemas.

GET/api/v1/snapshots

List snapshots for a stream or entity.

GET/api/v1/pipelines

List stream processing pipelines.

GET/health

Health check endpoint (root path, not under /api/v1).

GET/metrics

Prometheus-format metrics.

Example: Ingest an Event

curl -X POST http://localhost:3900/api/v1/events \
  -H "Content-Type: application/json" \
  -d '{
    "stream": "orders",
    "event_type": "OrderCreated",
    "data": {
      "order_id": "ord-123",
      "amount": 99.99
    }
  }'

Full Reference

For complete endpoint documentation including request/response schemas, query parameters, and advanced features, see the docs directory on GitHub.