QANATIX
API Reference

Admin API

Tenant management, system stats, reindexing, and export.

Admin API

Admin endpoints require the admin scope on your API key.

GET /admin/tenants

List all tenants with entity counts.

curl https://api.qanatix.com/api/v1/admin/tenants \
  -H "Authorization: Bearer sk_live_abc123..."

Response (200)

[
  {
    "tenant_id": "tenant-abc",
    "entity_count": 15420,
    "verticals": ["manufacturing", "pharma"],
    "created_at": "2026-01-15T10:00:00Z"
  }
]

GET /admin/stats

System-wide statistics.

curl https://api.qanatix.com/api/v1/admin/stats \
  -H "Authorization: Bearer sk_live_abc123..."

Response (200)

{
  "total_entities": 48230,
  "entities_by_status": {
    "active": 47100,
    "archived": 980,
    "draft": 150
  },
  "embedding_status": {
    "completed": 46800,
    "pending": 200,
    "processing": 50,
    "failed": 50
  },
  "qdrant_collections": 5,
  "queue_depth": 12
}

POST /admin/reindex/{vertical}

Reset all entities in a vertical to pending embedding status. The worker re-embeds and re-indexes them.

Use this after changing embedding dimensions or model configuration.

curl -X POST https://api.qanatix.com/api/v1/admin/reindex/manufacturing \
  -H "Authorization: Bearer sk_live_abc123..."

Response (200)

{
  "vertical": "manufacturing",
  "entities_reset": 15420,
  "message": "All entities queued for re-embedding"
}

POST /admin/reindex/entity/{id}

Reindex a single entity.

curl -X POST https://api.qanatix.com/api/v1/admin/reindex/entity/550e8400-... \
  -H "Authorization: Bearer sk_live_abc123..."

Response (200)

{
  "entity_id": "550e8400-...",
  "status": "pending",
  "message": "Entity queued for re-embedding"
}

GET /export

Export entities as CSV or JSON. Streaming response for large datasets.

# CSV export
curl "https://api.qanatix.com/api/v1/export?vertical=manufacturing&format=csv" \
  -H "Authorization: Bearer sk_live_abc123..." \
  -o export.csv

# JSON export
curl "https://api.qanatix.com/api/v1/export?vertical=manufacturing&format=json" \
  -H "Authorization: Bearer sk_live_abc123..." \
  -o export.json

Query parameters

ParameterTypeRequiredDefaultDescription
verticalstringyesVertical to export
formatstringnojsoncsv or json
statusstringnoactiveactive, archived, or draft

Health endpoints

These don't require the admin scope.

GET /health

Liveness check. Returns 200 if the API is running.

GET /health/ready

Readiness check. Verifies Postgres, Redis, and Qdrant are connected.

GET /health/worker

SAQ worker status — queue size and active jobs.

GET /health/qdrant

Qdrant connectivity check.

GET /health/search

Search quality metrics — latency percentiles, zero-result rate, fallback count.

GET /metrics

Prometheus-compatible metrics endpoint for monitoring integration.

On this page