DB2 API¶
This page documents DB2 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.
Permissions
Creating a datastore requires the Manager role, plus the Editor team permission on at least one of the assigned teams (the Public team when teams is left out). Admins are exempt.
Names are stored in upper case
Qualytics converts database and schema to upper case, matching how DB2 stores unquoted
identifiers. Sending mydb records it as MYDB. A value written as a Vault reference is left
exactly as you sent it.
Creating a Source Datastore¶
This section provides sample payloads for creating a DB2 datastore. Replace the placeholder values with actual data relevant to your setup.
Endpoint: /api/datastores (post)
{
"name": "your_datastore_name",
"teams": ["Public"],
"database": "db2_database",
"schema": "db2_schema",
"enrichment_only": false,
"trigger_sync": true,
"connection": {
"name": "your_connection_name",
"type": "db2",
"host": "db2_host",
"port": 50000,
"username": "db2_username",
"password": "db2_password",
"max_parallelization": 10,
"parameters": {
"ssl": true,
"tls_certificate": "-----BEGIN CERTIFICATE-----\n<server certificate>\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n<intermediate certificate>\n-----END CERTIFICATE-----"
}
}
}
# Step 1: Create a Connection
qualytics connections create \
--type db2 \
--name "your_connection_name" \
--host ${DB2_HOST} \
--port 50000 \
--username ${DB2_USER} \
--password ${DB2_PASSWORD}
# Step 2: Create a Source Datastore
qualytics datastores create \
--name "your_datastore_name" \
--connection-name "your_connection_name" \
--database DB2 \
--schema DB2INST1
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": "db2_database",
"schema": "db2_enrichment_schema",
"enrichment_only": true,
"connection": {
"name": "your_connection_name",
"type": "db2",
"host": "db2_host",
"port": 50000,
"username": "db2_username",
"password": "db2_password",
"max_parallelization": 10,
"parameters": {
"ssl": true,
"tls_certificate": "-----BEGIN CERTIFICATE-----\n<server certificate>\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n<intermediate certificate>\n-----END CERTIFICATE-----"
}
}
}
# Step 1: Create a Connection
qualytics connections create \
--type db2 \
--name "your_connection_name" \
--host ${DB2_HOST} \
--port 50000 \
--username ${DB2_USER} \
--password ${DB2_PASSWORD}
# Step 2: Create an Enrichment Datastore
qualytics datastores create \
--name "your_datastore_name" \
--connection-name "your_connection_name" \
--database DB2 \
--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)