Skip to content

Runs API

The endpoints documented on this page are used to manage existing Runs: list them, fetch a single Run, abort an in-flight Run, resume or rerun a finished one, and delete a Run record. For payload examples to create a new Run, see the API page for the specific operation type (for example, Scan API or Promote API).

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

Tip

For complete API documentation, including request and response schemas, visit the API docs.

Listing Runs

Send GET /api/operations to retrieve a paginated list of Runs across all operation types. The endpoint supports rich filtering and sorting via query parameters.

Query parameter Type Description
id integer Filter by a specific Run ID.
schedule_id integer Filter by the schedule that triggered the Runs.
operation_type string One of catalog (Sync operation), profile, scan, external_scan, export, materialize, promote.
finished boolean true returns only finished Runs; false returns only in-progress.
result list of strings Accepted values: queued, running, success, failure, aborted. Repeat the parameter to pass multiple.
created_date, start_date, end_date date (YYYY-MM-DD) Filter by the Run's creation, start, or end date.
datastore list of integers Filter by datastore ID. Repeat to pass multiple.
container list of integers Filter by container ID. Repeat to pass multiple.
has_logs boolean true returns only Runs that produced log entries.
offset integer Timezone offset in minutes (used to align date filters with the caller's timezone).
sort_created asc or desc Sort the result by created_date.
sort_duration asc or desc Sort the result by duration.
List recent Scan Runs in terminal states

Request:

curl -X GET "https://your-instance.qualytics.io/api/operations?operation_type=scan&result=success&result=failure&sort_created=desc" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response (abbreviated):

{
  "items": [
    {
      "id": 53388,
      "type": "scan",
      "created": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
      "start_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
      "end_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
      "result": "success",
      "message": null,
      "triggered_by": "user@example.com",
      "datastore": { "id": 101, "name": "Datastore-Sample" },
      "status": {
        "total_containers": 14,
        "containers_analyzed": 14,
        "partitions_scanned": 42,
        "records_processed": 700000,
        "anomalies_identified": 0
      }
    }
  ],
  "total": 1,
  "page": 1,
  "size": 50,
  "pages": 1
}

Retrieving a Run

Send GET /api/operations/{id} to return the full detail payload for a single Run, including the configuration it used, the summary metrics, and the triggering metadata.

For the full shape of the response object (including operation-specific fields such as auto_resolved_anomaly_count on Scan Runs), see the response example in Scan API: Retrieving Scan operation information.

Fetch a single Run by ID

Request:

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

Listing containers in a Run

Send GET /api/operations/{id}/containers to return the per-container breakdown of a Run (one entry per container that the Run targeted), with the container-level status and counters. Most useful for Profile and Scan Runs that track progress at the container layer.

List containers processed in a Scan Run

Request:

curl -X GET "https://your-instance.qualytics.io/api/operations/53388/containers" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response (abbreviated):

{
  "items": [
    {
      "id": 456,
      "container": { "id": 234, "name": "customers", "container_type": "table" },
      "start_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
      "end_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
      "records_processed": 50000,
      "anomaly_count": 0,
      "result": "success",
      "message": null
    }
  ],
  "total": 14
}

Aborting a Run

Send PUT /api/operations/abort/{id} to stop an in-progress Run. The Run transitions to Aborted as soon as the worker can stop safely, and partial results captured up to the stop point are preserved.

Permission: Editor team permission on the target datastore.

Abort an in-flight Run

Request:

curl -X PUT "https://your-instance.qualytics.io/api/operations/abort/53388" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response (abbreviated): the endpoint returns the updated Run with result set to aborted and end_time populated.

Resuming a Run

Send PUT /api/operations/run/{id} to continue an Aborted or Failure Run from the unprocessed containers (or partitions). Containers already completed in the original Run are not re-read.

Supported by Profile, Scan, and Promote. Not supported by Sync, External Scan, Export, or Materialize.

Permission: Editor team permission on the target datastore.

Query parameter Type Description
force_abort boolean When true, forces the current operation to abort before resuming. Default false.
Resume a Run from where it stopped

Request:

curl -X PUT "https://your-instance.qualytics.io/api/operations/run/53204" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response (abbreviated): the endpoint returns the updated Run with result set back to running (or briefly queued) and the new dispatch timestamp.

Rerunning a Run

Send PUT /api/operations/rerun/{id} to start a brand-new Run that reuses the configuration of an existing Run. Every container is processed from scratch, regardless of whether it succeeded before.

Supported by Sync, Profile, Scan, Export, Materialize, and Promote. Not supported by External Scan.

Permission: Editor team permission on the target datastore.

Rerun a finished Run with the same configuration

Request:

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

Response (abbreviated): the endpoint returns the new Run created from the original's configuration, with a fresh id, created timestamp, and result set to queued or running.

Deleting a Run

Send DELETE /api/operations/{id} to remove the Run record (and its summary metrics) from the Activity list. Anomalies, computed data, and other downstream artifacts produced by the Run are not removed; only the Run's own record is.

Permission: Editor team permission on the target datastore.

Delete a Run record from the Activity list

Request:

curl -X DELETE "https://your-instance.qualytics.io/api/operations/53388" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response: 204 No Content on success.

Error Responses

Status Code Description
400 Bad Request The payload is malformed or the id path parameter is invalid.
401 Unauthorized Missing or invalid API token.
403 Forbidden The user does not have the required team permission on the datastore.
404 Not Found A Run with the specified ID does not exist.
409 Conflict The Run is not in a state that supports the action (for example, calling Abort on a Run that already finished, or Resume on a Run type that does not support it).
422 Unprocessable Entity A query parameter or payload value fails schema validation.