QANATIX
API Reference

Connectors API

Database connector management — create, list, pull, delete.

Connectors API

Manage pull-based database connectors. QANATIX connects to your database, runs your query, and ingests the results.

POST /connectors

Register a new database connector.

curl -X POST https://api.qanatix.com/api/v1/connectors \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Postgres",
    "connector_type": "postgresql",
    "vertical": "manufacturing",
    "entity_type": "product",
    "connection_config": {
      "dsn": "postgresql://user:pass@db.internal:5432/products"
    },
    "query": "SELECT id, name, sku, price FROM products WHERE updated_at > :last_pull",
    "name_column": "name",
    "batch_size": 5000
  }'

Request body

FieldTypeRequiredDescription
namestringyesHuman-readable name
connector_typestringyespostgresql, mysql, mongodb, neo4j
verticalstringyesTarget vertical
entity_typestringyesTarget entity type
connection_configobjectyesDatabase credentials (encrypted at rest)
querystringyesSQL query or MongoDB filter
name_columnstringnoColumn to use as entity name
batch_sizeintegernoRecords per batch (default: 5000)

Supported databases

TypeDriverConfig format
postgresqlasyncpg{"dsn": "postgresql://..."}
mysqlasyncmy{"host": "...", "port": 3306, "user": "...", "password": "...", "database": "..."}
mongodbpymongo{"uri": "mongodb://...", "database": "...", "collection": "..."}
neo4jneo4j v6.1{"uri": "bolt://...", "user": "...", "password": "...", "database": "..."}

Response (201)

{
  "id": "c1d2e3f4-...",
  "name": "Production Postgres",
  "connector_type": "postgresql",
  "vertical": "manufacturing",
  "entity_type": "product",
  "connection_config": "***REDACTED***",
  "created_at": "2026-03-07T10:00:00Z"
}

Credentials are never returned — only ***REDACTED***.

GET /connectors

List all registered connectors.

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

POST /connectors/{connector_id}/pull

Trigger a data pull.

curl -X POST https://api.qanatix.com/api/v1/connectors/c1d2e3f4-.../pull \
  -H "Authorization: Bearer sk_live_abc123..."

Response (200)

{
  "status": "completed",
  "records_pulled": 2847,
  "records_ingested": 2841,
  "duplicates_skipped": 6,
  "duration_seconds": 12.4
}

DELETE /connectors/{connector_id}

Delete a connector and its encrypted credentials.

curl -X DELETE https://api.qanatix.com/api/v1/connectors/c1d2e3f4-... \
  -H "Authorization: Bearer sk_live_abc123..."

Response

204 No Content

Security

  • Credentials encrypted with Fernet (AES-128-CBC + HMAC-SHA256) at rest
  • CONNECTOR_ENCRYPTION_KEY must be set in production
  • Key rotation via MultiFernet (comma-separated keys)
  • Credentials never returned in API responses
  • Connections established only during pull, then closed

On this page