TimescaleDB API¶
Creating a Source Datastore¶
This section provides a sample payload for creating a TimescaleDB datastore. Replace the placeholder values with actual data relevant to your setup.
Endpoint (Post): /api/datastores (post)
{
"name": "your_datastore_name",
"teams": ["Public"],
"database": "timescale_database",
"schema": "timescale_schema",
"enrichment_only": false,
"trigger_sync": true,
"connection": {
"name": "your_connection_name",
"type": "timescale",
"host": "timescale_host",
"port": 5432,
"username": "timescale_username",
"password": "timescale_password"
}
}
# Step 1: Create a Connection
qualytics connections create \
--type timescale \
--name "your_connection_name" \
--host ${TIMESCALE_HOST} \
--port 5432 \
--username ${TIMESCALE_USER} \
--password ${TIMESCALE_PASSWORD}
# Step 2: Create a Source Datastore
qualytics datastores create \
--name "your_datastore_name" \
--connection-name "your_connection_name" \
--database your_database \
--schema public
Link an Enrichment Destination¶
Endpoint Details: /api/datastores/{datastore-id}/enrichment/{enrichment-id} (patch)