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 record counts.
curl https://api.qanatix.com/api/v1/admin/tenants \
-H "Authorization: Bearer sk_live_abc123..."Response (200)
[
{
"tenant_id": "tenant-abc",
"record_count": 15420,
"collections": ["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_records": 48230,
"records_by_status": {
"active": 47100,
"archived": 980,
"draft": 150
},
"indexing_status": {
"indexed": 46800,
"pending": 200,
"processing": 50,
"failed": 50
},
"queue_depth": 12
}POST /admin/reindex/{collection}
Rebuild the search_text tsvector for all records in a collection. Use this after changing how search text is generated.
curl -X POST https://api.qanatix.com/api/v1/admin/reindex/manufacturing \
-H "Authorization: Bearer sk_live_abc123..."Response (200)
{
"collection": "manufacturing",
"records_reset": 15420,
"message": "All records queued for reindexing"
}POST /admin/reindex/record/{id}
Reindex a single record.
curl -X POST https://api.qanatix.com/api/v1/admin/reindex/record/550e8400-... \
-H "Authorization: Bearer sk_live_abc123..."Response (200)
{
"record_id": "550e8400-...",
"status": "pending",
"message": "Record queued for reindexing"
}Export (async)
Exports are now asynchronous. Start an export, poll for status, then download.
POST /export
Start an export job.
curl -X POST "https://api.qanatix.com/api/v1/export?collection=manufacturing&format=csv" \
-H "Authorization: Bearer sk_live_abc123..."Response (202)
{
"export_id": "exp_abc123",
"status": "processing"
}Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
collection | string | yes | — | Collection to export |
format | string | no | json | csv or json |
status | string | no | active | active, archived, or draft |
GET /export/{id}/status
Check export progress.
curl "https://api.qanatix.com/api/v1/export/exp_abc123/status" \
-H "Authorization: Bearer sk_live_abc123..."Response (200)
{
"status": "processing",
"progress": 4200,
"total": 15420
}GET /export/{id}/download
Download the completed export file.
curl "https://api.qanatix.com/api/v1/export/exp_abc123/download" \
-H "Authorization: Bearer sk_live_abc123..." \
-o export.csvGET /export/active
List active exports.
curl "https://api.qanatix.com/api/v1/export/active" \
-H "Authorization: Bearer sk_live_abc123..."Note: The Python SDK's qx.export() still wraps this as a streaming download for convenience — it starts the export, polls for completion, and streams the result.
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 and Redis are connected.
GET /health/search
Search quality metrics — latency percentiles, zero-result rate, fallback count.
GET /metrics
Prometheus-compatible metrics endpoint for monitoring integration.