Skip to content

Documentation

Connections, deliveries, and quality checks

Connect an external database

POST /api/v1/connections requires code, name, driver, host, and database. The code contains lowercase Latin letters, digits, and hyphens. Optional fields include port, username, password, description, options, and is_active.

{
  "code":"store-db",
  "name":"Store database",
  "driver":"pgsql",
  "host":"db.example.invalid",
  "port":5432,
  "database":"catalog",
  "username":"catalog_writer",
  "password":"REPLACE_ME",
  "options":{"schema":"public","sslmode":"require"}
}

Drivers are pgsql, mysql, mongodb, and s3. MongoDB supports auth_source and replica_set in options. For S3, database is the bucket, username is the access key, and password is the secret. Set region, use_path_style, use_tls, and base_prefix in options. Do not paste an entire connection string into host.

POST /connections/{id}/test checks a saved connection. POST /connections/probe tests parameters before saving. Both contact the specified server. Secrets are not returned; a blank password field in the interface does not mean that no password is stored.

Deliver a result

Create a delivery through POST /exports/{id}/deliveries.

{
  "name":"Catalog update",
  "target":"database",
  "connection_id":1,
  "table_name":"products",
  "write_mode":"upsert",
  "trigger":"after_run",
  "incremental":true,
  "is_active":true
}
Parameter Values
target file or database
write_mode upsert by key, append, or replace all rows
trigger after_run, manual, or cron
cron Required when trigger=cron
timezone For example Europe/Moscow
incremental Send changes since the last successful delivery

Delivery cron is at the root of its JSON, unlike a collection schedule's preset.cron. replace removes previous table contents. Use it only when the recipient expects a complete replacement.

GET /connections/{connection}/structure/{export} previews a proposed database structure. POST to the same path applies it and requires separate permission. Review the proposal first, especially for an existing table.

POST /deliveries/{id}/run queues a delivery. Check export history for its state. /reset-cursor clears the position marker, so the next delivery may repeat the whole set. The recipient must handle duplicate records.

Browse S3

GET /connections/{id}/storage/objects lists objects, /storage/search searches, and /storage/download downloads. Storage read access is required. These methods operate within an accessible connection; they do not grant unrestricted access to the platform file system.

Data quality

GET /quality/vocabulary lists rule kinds, actions, and parameters. GET /quality/rules returns rules; GET /quality/findings returns detected issues. To create a rule for a site, send site_id, kind, name, params, and optionally action to POST /quality/rules.

{"site_id":1,"kind":"row_count_drop","name":"Product count dropped","params":{"drop_percent":30,"min_previous":100},"action":"warn","is_active":true}

Check allowed kind and action values in your installation's vocabulary. Platform-wide rules without site_id cannot be changed through the external API. Update your own rule with PATCH /quality/rules/{id} or remove it with DELETE. A rule cannot be moved to another site. A quality finding does not automatically correct data; inspect the source and collection script.