Skip to content

Scan API

This page provides payload examples for running, scheduling, and checking the status of scan 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.

Running a Scan operation

To run a scan operation, use the API payload example below and replace the placeholder values with your specific values.

Endpoint (Post)

Endpoint: POST /api/operations/run

  • container_names: [] means that it will scan all containers.
  • max_records_analyzed_per_partition: null means that it will scan all records of all containers.
  • Remediation: append replicates source containers using an append-first strategy.
  • auto_resolve_passed_anomalies: true (default for Full scans) automatically resolves previously open anomalies when the same checks no longer detect the issue. Forced to false server-side when incremental is true.
{
    "type":"scan",
    "name":null,
    "datastore_id": 42,
    "container_names":[],
    "remediation":"append",
    "incremental":false,
    "auto_resolve_passed_anomalies":true,
    "max_records_analyzed_per_partition":null,
    "enrichment_source_record_limit":10
}
  • container_names: ["table_name_1", "table_name_2"] means that it will scan only the tables table_name_1 and table_name_2.
  • max_records_analyzed_per_partition: 1000000 means that it will scan a maximum of 1 million records per partition.
  • Remediation: overwrite replicates source containers using an overwrite strategy.
{
    "type":"scan",
    "name":null,
    "datastore_id": 42,
    "container_names":[
      "table_name_1",
      "table_name_2"
    ],
    "max_records_analyzed_per_partition":1000000,
    "enrichment_source_record_limit":10
}

Scheduling a Scan operation of all containers

To schedule a scan operation, use the API payload example below and replace the placeholder values with your specific values.

Endpoint (Post)

Endpoint: POST /api/operations/schedule

This payload is to run a scheduled scan operation every day at 00:00

{
    "type":"scan",
    "name":"My scheduled Scan operation",
    "datastore_id":"datastore-id",
    "container_names":[],
    "remediation": "overwrite",
    "incremental": false,
    "auto_resolve_passed_anomalies": true,
    "max_records_analyzed_per_partition":null,
    "enrichment_source_record_limit":10,
    "crontab":"0 0 * * *"
}

Retrieving Scan operation information

Endpoint (Get)

Endpoint: GET /api/operations/{id}

The status object includes auto_resolved_anomaly_count, the number of previously open anomalies this scan automatically resolved (always 0 for Incremental scans and for Full scans that ran with auto_resolve_passed_anomalies set to false).

{
    "items": [
        {
            "id": 12345,
            "created": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
            "type": "scan",
            "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",
                "store_type": "jdbc",
                "type": "db_type",
                "enrich_only": false,
                "enrich_container_prefix": "data_prefix",
                "favorite": false
            },
            "schedule": null,
            "incremental": false,
            "auto_resolve_passed_anomalies": true,
            "remediation": "none",
            "max_records_analyzed_per_partition": -1,
            "greater_than_time": null,
            "greater_than_batch": null,
            "high_count_rollup_threshold": 10,
            "enrichment_source_record_limit": 10,
            "status": {
                "total_containers": 2,
                "containers_analyzed": 2,
                "partitions_scanned": 2,
                "records_processed": 28,
                "anomalies_identified": 2,
                "auto_resolved_anomaly_count": 1
            },
            "containers": [
                {
                "id": 234,
                "name": "Container1",
                "container_type": "table",
                "table_type": "table"
                },
                {
                "id": 235,
                "name": "Container2",
                "container_type": "table",
                "table_type": "table"
                }
            ],
            "container_scans": [
                {
                "id": 456,
                "created": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
                "container": {
                    "id": 235,
                    "name": "Container2",
                    "container_type": "table",
                    "table_type": "table"
                },
                "start_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
                "end_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
                "records_processed": 8,
                "anomaly_count": 1,
                "auto_resolved_anomaly_count": 1,
                "result": "success",
                "message": null
                },
                {
                "id": 457,
                "created": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
                "container": {
                    "id": 234,
                    "name": "Container1",
                    "container_type": "table",
                    "table_type": "table"
                },
                "start_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
                "end_time": "YYYY-MM-DDTHH:MM:SS.ssssssZ",
                "records_processed": 20,
                "anomaly_count": 1,
                "auto_resolved_anomaly_count": 0,
                "result": "success",
                "message": null
                }
            ],
            "tags": []
        }
    ],
    "total": 1,
    "page": 1,
    "size": 50,
    "pages": 1
}