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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Human-readable name |
connector_type | string | yes | postgresql, mysql, mongodb, neo4j |
vertical | string | yes | Target vertical |
entity_type | string | yes | Target entity type |
connection_config | object | yes | Database credentials (encrypted at rest) |
query | string | yes | SQL query or MongoDB filter |
name_column | string | no | Column to use as entity name |
batch_size | integer | no | Records per batch (default: 5000) |
Supported databases
| Type | Driver | Config format |
|---|---|---|
postgresql | asyncpg | {"dsn": "postgresql://..."} |
mysql | asyncmy | {"host": "...", "port": 3306, "user": "...", "password": "...", "database": "..."} |
mongodb | pymongo | {"uri": "mongodb://...", "database": "...", "collection": "..."} |
neo4j | neo4j 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_KEYmust be set in production- Key rotation via
MultiFernet(comma-separated keys) - Credentials never returned in API responses
- Connections established only during pull, then closed