Skip to content

Export Operation API

This page provides payload examples for triggering, scheduling, re-running, and polling Export Operations. Replace the placeholder values with data specific to your setup.

All endpoints use the base URL of your Qualytics deployment (e.g., https://your-instance.qualytics.io/api).

Interactive API reference

For the full, interactive API reference (request schemas, response examples, and an in-browser request runner), visit demo.qualytics.io/api/docs.

Permissions

Triggering, scheduling, updating, deleting, and re-running Export Operations all require the Editor team permission on the source datastore. Reading an operation or schedule requires Reporter. Workspace Admin bypasses team-permission checks. See Permissions for the full matrix.

Trigger an Export Operation

Trigger a one-shot Export Operation. The call returns as soon as the work is enqueued; the operation processes asynchronously and writes its output table to the linked enrichment datastore. Poll GET /operations/{id} to follow status.

Endpoint: POST /operations/run

Permission: Editor on the source datastore.

Field Type Required Description
type string Yes Must be "export".
datastore_id integer Yes The source datastore to export from. Must already have an enrichment datastore linked.
asset_type string Yes One of "anomalies", "checks", "profiles".
container_ids list[int] No Container IDs to include. Ignored if container_tags is also set. Both null = "All containers".
container_tags list[string] No Container tag names to include. Takes precedence over container_ids when both are set.
include_deleted bool No Include deleted assets in the export. Defaults to false.
include_masked bool No Reveal masked values in the export. Defaults to false. Editor permission required.

Container selection

If both container_ids and container_tags are provided on a trigger request, container_tags takes precedence and container_ids is ignored. Provide only one. (The Schedule an Export Operation endpoint is stricter: it rejects a request that sets both with 422 Unprocessable Entity.)

Trigger by container IDs

Request:

curl -X POST "https://your-instance.qualytics.io/api/operations/run" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "export",
    "datastore_id": 42,
    "asset_type": "checks",
    "container_ids": [101, 102, 103],
    "include_deleted": false,
    "include_masked": false
  }'

Response (200 OK):

{
  "id": 12345,
  "type": "export",
  "datastore_id": 42,
  "asset_type": "checks",
  "result": "queued",
  "start_time": null,
  "end_time": null,
  "triggered_by": "user@example.com"
}
Trigger by container tag

Request:

curl -X POST "https://your-instance.qualytics.io/api/operations/run" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "export",
    "datastore_id": 42,
    "asset_type": "profiles",
    "container_tags": ["pii", "finance"],
    "include_masked": true
  }'

Response (200 OK):

{
  "id": 12346,
  "type": "export",
  "datastore_id": 42,
  "asset_type": "profiles",
  "result": "queued",
  "include_masked": true
}
Trigger across all containers

Request:

curl -X POST "https://your-instance.qualytics.io/api/operations/run" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "export",
    "datastore_id": 42,
    "asset_type": "anomalies"
  }'

Response (200 OK):

{
  "id": 12347,
  "type": "export",
  "datastore_id": 42,
  "asset_type": "anomalies",
  "result": "queued"
}

Poll an Operation

Read the current state of a previously triggered Export Operation.

Endpoint: GET /operations/{id}

Permission: Reporter on the source datastore.

The result field transitions through queuedrunning → one of success, partial, warning, failure.

Poll status

Request:

curl -X GET "https://your-instance.qualytics.io/api/operations/12345" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200 OK, excerpt):

{
  "id": 12345,
  "type": "export",
  "datastore_id": 42,
  "asset_type": "checks",
  "result": "success",
  "start_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
  "end_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
  "message": null,
  "triggered_by": "user@example.com"
}

Re-run an Operation

Re-run a previously completed Export Operation. The new operation inherits the original's parameters and produces a fresh record. The schedule association from the original is not carried over.

Endpoint: PUT /operations/rerun/{id}

Permission: Editor on the source datastore.

Re-run a completed operation

Request:

curl -X PUT "https://your-instance.qualytics.io/api/operations/rerun/12345" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200 OK):

{
  "id": 12399,
  "type": "export",
  "datastore_id": 42,
  "asset_type": "checks",
  "result": "queued"
}

Re-running a running operation

Attempting to re-run an operation whose original has not finished yet returns 415 Unsupported Media Type. Wait for the original to reach success, partial, warning, or failure before re-running.

Schedule an Export Operation

Create a recurring Export Operation schedule. Schedules run the configured payload on the cron cadence in the chosen IANA timezone.

Endpoint: POST /operations/schedule

Permission: Editor on the source datastore.

Field Type Required Description
type string Yes Must be "export".
name string No Friendly label for the schedule.
datastore_id integer Yes The source datastore to export from.
asset_type string Yes One of "anomalies", "checks", "profiles".
container_ids / container_tags list No Container selection (mutually exclusive).
include_deleted bool No Defaults to false.
include_masked bool No Defaults to false.
crontab string Yes 5-field cron expression (e.g. 0 0 * * * for daily at 00:00).
timezone string No IANA timezone name (e.g. America/New_York). Defaults to UTC when omitted.
deactivated bool No When true, the schedule is created in a deactivated state. Defaults to false.
Schedule a daily Quality Check export at 00:00 in UTC

Request:

curl -X POST "https://your-instance.qualytics.io/api/operations/schedule" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "export",
    "name": "Daily checks export",
    "datastore_id": 42,
    "asset_type": "checks",
    "include_deleted": false,
    "include_masked": false,
    "crontab": "0 0 * * *",
    "timezone": "UTC"
  }'

Response (200 OK):

{
  "id": 87,
  "name": "Daily checks export",
  "type": "export",
  "datastore_id": 42,
  "asset_type": "checks",
  "crontab": "0 0 * * *",
  "timezone": "UTC",
  "deactivated": false
}

Update a Schedule

Modify an existing schedule. You can change the cron expression, timezone, name, asset type, or any other field listed above.

Endpoint: PUT /operations/schedule/{id}

Permission: Editor on the source datastore.

Update the cron expression of an existing schedule

Request:

curl -X PUT "https://your-instance.qualytics.io/api/operations/schedule/87" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "export",
    "name": "Daily checks export",
    "datastore_id": 42,
    "asset_type": "checks",
    "crontab": "0 6 * * *",
    "timezone": "America/New_York"
  }'

Response (200 OK):

{
  "id": 87,
  "name": "Daily checks export",
  "type": "export",
  "datastore_id": 42,
  "asset_type": "checks",
  "crontab": "0 6 * * *",
  "timezone": "America/New_York",
  "deactivated": false
}

Deactivation preserves the cron expression

Deactivating a schedule keeps its cron expression. Reactivate it later to resume the same cadence without re-entering anything.

Delete a Schedule

Remove a schedule. The operation history of past runs is preserved; only the schedule itself is removed.

Endpoint: DELETE /operations/schedule/{id}

Permission: Editor on the source datastore.

Delete a schedule

Request:

curl -X DELETE "https://your-instance.qualytics.io/api/operations/schedule/87" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (204 No Content): empty body.