PostgreSQL API¶
This page documents PostgreSQL payloads for the datastore API: sample requests with placeholder values to replace with your own. For generic operations (get, list, update, delete, multi-schema bulk), see Datastore API.
Complete API Reference
For the full interactive API documentation with all request/response schemas, visit the API docs.
Note
The database key must be present in the payload, but its value can be empty (""). When it is empty, the connection uses the postgres database. Omitting the key, or sending null, is rejected.
Creating a Source Datastore¶
This section provides sample payloads for creating a PostgreSQL datastore. Replace the placeholder values with actual data relevant to your setup.
Endpoint: /api/datastores (post)
{
"name": "your_datastore_name",
"teams": ["Public"],
"database": "postgresql_database",
"schema": "postgresql_schema",
"enrichment_only": false,
"trigger_sync": true,
"connection": {
"name": "your_connection_name",
"type": "postgresql",
"host": "postgresql_host",
"port": 5432,
"username": "postgresql_username",
"password": "postgresql_password"
}
}
# Step 1: Create a Connection
qualytics connections create \
--type postgresql \
--name "your_connection_name" \
--host ${DB_HOST} \
--port 5432 \
--username ${DB_USER} \
--password ${DB_PASSWORD}
# Step 2: Create a Source Datastore
qualytics datastores create \
--name "your_datastore_name" \
--connection-name "your_connection_name" \
--database your_database \
--schema public
Create an Enrichment Datastore¶
This section provides sample payloads for creating an enrichment datastore. Replace the placeholder values with actual data relevant to your setup.
Endpoint: /api/datastores (post)
{
"name": "your_datastore_name",
"teams": ["Public"],
"database": "postgresql_database",
"schema": "postgresql_schema",
"enrichment_only": true,
"connection": {
"name": "your_connection_name",
"type": "postgresql",
"host": "postgresql_host",
"port": 5432,
"username": "postgresql_username",
"password": "postgresql_password"
}
}
# Step 1: Create a Connection
qualytics connections create \
--type postgresql \
--name "your_connection_name" \
--host ${DB_HOST} \
--port 5432 \
--username ${DB_USER} \
--password ${DB_PASSWORD}
# Step 2: Create an Enrichment Datastore
qualytics datastores create \
--name "your_datastore_name" \
--connection-name "your_connection_name" \
--database your_database \
--schema your_enrichment_schema \
--enrichment-only
Link an Enrichment Destination¶
Use the provided endpoint to link a datastore to its enrichment destination:
Endpoint Details: /api/datastores/{datastore-id}/enrichment/{enrichment-id} (patch)