REST API
Everything in the web app is available over a JSON REST API, so you can refresh test data from a CI/CD pipeline.
Authenticate
curl -s -X POST https://<host>/auth/signin \
-H 'Content-Type: application/json' \
-d '{"username":"ci.bot","password":"…"}'
# → {"access_token":"eyJ…","token_type":"bearer"}
Send the token on every call: Authorization: Bearer <access_token>. Use a dedicated Member account for automation, and save the passwords of the connections it uses.
Main endpoints
| Area | Endpoint |
|---|---|
| Connections | /api/v1/connections |
| Virtual data sets & prune | /api/v1/vds · POST /api/v1/vds/shrink to run · GET /api/v1/vds/shrink/{id}/status · /result · /artifacts |
| Bloom plans | POST /api/v1/bloom/plans {vds_id, learn, learn_columns} (from a VDS) · POST /api/v1/bloom/plans/from-sql (DDL or template) · GET /api/v1/bloom/templates · POST /api/v1/bloom/plans/{id}/preflight |
| Bloom runs | POST /api/v1/bloom/plans/{id}/runs {seed, scale, formats} · GET /api/v1/bloom/runs/{id}/status · /runs/{id}/artifacts |
| Load | POST /api/v1/bloom/runs/{id}/load/preflight to check · POST /api/v1/bloom/runs/{id}/load to load |
Long jobs return a task ID. Their …/status endpoints stream progress as server-sent events.
Load options
| Field | Meaning |
|---|---|
connection_id | The target. It must be approved as a test database, or the call returns 403 Approve this connection as a test database before loading into it. |
schema_name | Target schema; the connection's default if empty |
mode | append (default) or replace |
create_missing | Create missing tables |
keep_schemas | For plans read from several schemas: load each table into its own schema |
create_schema | Create the target schema if it's missing |
recreate_tables | Plan tables to drop and create again before loading |
confirm_database | The target database's exact name. Required for replace and recreate_tables. |
learn_columns lists the columns whose value mixes a plan may learn. Leave it empty to learn table sizes only.
Example: refresh test data in a pipeline
TOKEN=$(curl -s -X POST https://<host>/auth/signin -H 'Content-Type: application/json' \
-d '{"username":"ci.bot","password":"'"$DF_PASSWORD"'"}' | jq -r .access_token)
# Generate a fresh, repeatable data set from an existing plan
curl -s -X POST https://<host>/api/v1/bloom/plans/$PLAN_ID/runs \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"seed": 42, "scale": 1, "formats": ["csv"]}'
Responses to handle
| Status | Meaning |
|---|---|
| 402 | The licence is missing or expired, so DataFactory is read-only. See Licence. |
| 403 | Not allowed, e.g. the load target isn't an approved test database. |
| 429 | Three runs are already queued or running for this account. Wait for one to finish. |
Interactive reference
The full, interactive API reference is at https://<host>/api/docs when your admin sets API_DOCS=true (it's off by default).