---
title: "Create DQ monitors in batch"
method: POST
path: "/data-quality/v1/dq-monitors/batch/create"
tags: ["Data Quality Monitors"]
---

# Create DQ monitors in batch

`POST /data-quality/v1/dq-monitors/batch/create`

## Request

- Base URL: `https://your-environment.ataccama.one/api`
- URL: `https://your-environment.ataccama.one/api/data-quality/v1/dq-monitors/batch/create`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ataccama/apis/ataccama-one-agentic-data-trust-platform-public-api/docs/data-quality/v1/dq-monitors/batch/create/post.ts> (a function with typed inputs; its response is checked against the schema)

Create up to 100 DQ monitors in a single request.

Each item requires `catalogItemUrn` and `name`. If an item includes sub-entities, such as rule
instances, store each of them under a temporary key that you choose.

Unlike [Create DQ monitor](#tag/data-quality-monitors/POST/data-quality/v1/catalog-items/{catalogItemUrn}/dq-monitors), batch-created monitors skip the draft stage and are created directly
as published versions.

The rules referenced by the item's rule instances must exist and have a published version, and the catalog item attributes in their mappings must exist.
If any of them are missing, the whole item is rejected with `VALIDATION_ERROR` and no monitor is created for it.

Each item is processed independently: a failure on one item does not cancel the rest. The response
is `207 Multi-Status`. It contains a `meta` summary (`total`, `success`, `fail`) and per-item
`results`. On success, a result carries the URN of the created monitor (rather than the full body,
to keep the response small) and, in `correlationIds`, the key assigned to each sub-entity the item
created. On failure, it carries the error instead.

By default, results are paired with the request items by position: the first result belongs to the
first item you sent. You can also add your own `id` to each item; the response returns it in the
matching result.

## Request body

- object
  - `data` DqMonitorBatchCreateItemRequest[], required
    - `name` string, required: The name of the DQ monitor. Not unique: multiple monitors can share a name. Identify a monitor by its URN, never by its name.
    - `manualRuleInstances` object, nullable: Rule instances applied manually, keyed by their id (UUID). Each rule instance references the rule it runs (`ruleUrn`) and contains the following sub-entity collections: - `mappings`: Maps rule input attributes (`ruleAttributeUrn`) to attributes of the monitor's own catalog item (`catalogItemAttributeUrn`). - `connectedMappings`: Maps rule input attributes (`ruleAttributeUrn`) to attributes of joined catalog items (`connectedCatalogItemAttributeUrn`). Each connected mapping references the join it goes through (see `joinConfigurations`). - `dqThresholds`: Thresholds used to trigger alert findings for this rule instance. - `parameterValues`: Values assigned to the rule's parameters; each entry references the parameter it sets (`ruleParameterUrn`).
    - `invalidSamplesConfiguration` InvalidSamplesConfiguration
      - `enabled` boolean: Whether invalid samples are collected. Collection also requires invalid samples to be enabled globally in the DQ retention settings; until they are, a monitor with this set to `true` still stores no samples.
      - `sampleSize` integer: How many invalid samples to keep.
    - `schedule` ScheduleRequest
      - `cronExpression` string: When the monitor runs.
      - `enabled` boolean: Whether the schedule is active.
      - `ignoreMisfires` boolean: Set to true if you don't want to run scheduled job in case of misfire. False means job will run once (even if there were multiple misfires) as soon as possible.
      - `description` string: Free-text description of the schedule.
      - `timeZone` string: Time zone the cron expression is evaluated in.
      - `startAt` string, date-time: Timestamp to start the schedule from.
      - `endAt` string, date-time: Timestamp to end the schedule or not present for no end.
      - `priority` integer: Scheduling priority.
    - `anomalyDetectionConfiguration` AnomalyDetectionConfiguration
      - `enabled` boolean: Whether anomaly detection runs.
    - `profilingConfiguration` ProfilingConfiguration
      - `enabled` boolean: Whether profiling runs.
      - `type` string: @ExtensibleEnum The kind of profiling to run: full profiling (`FULL`) or sample-based profiling.
      - `sampleLimitCount` integer: Absolute cap on profiled records.
      - `sampleLimitPercentage` integer: Percentage cap on profiled records.
    - `exportDefinitions` object, nullable: Configured exports for invalid records, keyed by their id (UUID).
    - `overallDqThresholds` object, nullable: Monitor-level thresholds used to trigger alert findings during processing, keyed by their id (UUID).
    - `joinConfigurations` object, nullable: Joins to other catalog items, defined by foreign-key attribute pairs and used to evaluate DQ rules across joined data, keyed by their id (UUID). See [Cross-table rules](https://docs.ataccama.com/ataccama-one-agentic/latest/data-quality/cross-table-rules.html). A join defines only the connection between the catalog items. The rule input attributes are then mapped onto attributes of the joined catalog item by the connected mappings of each rule instance in `manualRuleInstances`.
    - `dataSlice` DataSliceRequest: A condition that narrows the rows a DQ monitor reads. Only rows matching every predicate are profiled, evaluated, and sampled. Predicates are combined with AND; there is no OR and no nesting. Slices are supported only on catalog items from SQL sources. This is checked when the monitor is published.
      - `label` string: Display name of the slice. If you omit it, each run's results carry a label generated from the attributes and operators only, such as `COUNTRY IN`, never from the values.
      - `predicates` DataSlicePredicateRequest[], required: The conditions, all of which must hold. At least one is required.
        - `attributeUrn` string, uri, required: A URN identifying a catalog attribute resource in the Catalog API. Format: urn:ata:{tenant}:catalog:catalog-attribute:{uuid} Example: urn:ata:acme-corp:catalog:catalog-attribute:123e4567-e89b-12d3-a456-426614174000.
        - `operator` string, required: @ExtensibleEnum The comparison applied to the attribute. See the table above for the value fields each operator uses.
        - `value` string: The value compared against. Numbers are plain decimal strings, such as `5000` or `-12.5`.
        - `listValues` string[]: The values of an `IN_LIST` or `NOT_IN_LIST` condition.
        - `rangeStart` string, date-time: Inclusive start of a `DATE_RANGE`, as an [RFC 3339](https://www.rfc-editor.org/info/rfc3339/) date-time with `Z` or a UTC offset such as `+02:00`.
        - `rangeEnd` string, date-time: Inclusive end of a `DATE_RANGE`, as an [RFC 3339](https://www.rfc-editor.org/info/rfc3339/) date-time with `Z` or a UTC offset such as `+02:00`.
    - `id` string: Caller-supplied correlation identifier echoed back in the corresponding result item.
    - `catalogItemUrn` string, uri, required: A URN identifying a catalog item resource in the Catalog API. Format: urn:ata:{tenant}:catalog:catalog-item:{uuid} Example: urn:ata:acme-corp:catalog:catalog-item:123e4567-e89b-12d3-a456-426614174000.

## Response `207`

Multi-status batch outcome. Each item in `results` reports its own outcome: `OK` with the
created monitor's URN and its `correlationIds` mapping in `data`, or a non-`OK` `status` with
`error`. Inspect `meta` for the success and failure totals.

In the example, the first result maps the temporary key of the export definition to the key
assigned to it. The second result has no `correlationIds`, because its item created no
sub-entities. The third item fails with `RESOURCE_NOT_FOUND` because its catalog item does not
exist: it carries `error` instead of `data`, while the other two items are created regardless.

- object
  - `meta` BatchOperationMeta, required: Summary of a batch operation outcome. Lets clients assess batch health without iterating every item.
    - `total` integer, required: Number of items in the request.
    - `success` integer, required: Number of items with `OK` status.
    - `fail` integer, required: Number of items with non-`OK` status. `success + fail` equals `total`.
  - `results` DqMonitorBatchResultItemResponse[], required
    - union: Outcome of creating a single DQ monitor in a batch. On success (`status: OK`), `data` carries the URN of the created (published) monitor together with `correlationIds`, resolving each temporary key the request used inside keyed collections to the key the server assigned — the full monitor body is intentionally omitted to keep the response small. On failure, `error` is present. `data` and `error` are mutually exclusive.
      - object
        - `id` string: Echoes the caller-supplied correlation `id` from the corresponding request item, when one was supplied.
        - `status` string, required: @ExtensibleEnum Outcome status. `OK` indicates the monitor was created and published; any other value indicates failure and matches the corresponding error `type`.
        - `data` object, required: Present only when `status` is `OK`. Carries the URN of the created published monitor and the mapping from the request's temporary keys used inside keyed collections to the keys assigned to the sub-entities they created.
          - `urn` string, uri, required: A URN identifying the DQ monitor resource in the Data Quality API. Format: urn:ata:{tenant}:data-quality:dq-monitor:{uuid} Example: urn:ata:acme-corp:data-quality:dq-monitor:123e4567-e89b-12d3-a456-426614174000.
          - `correlationIds` object: Maps each temporary `new_<id>` key from your request to the key assigned to the sub-entity created under it, so you can resolve your temporary keys to the stored ones. The values are keys, not URNs: sub-entities such as export definitions have no URN of their own, and the key is what addresses the sub-entity when you retrieve the monitor or update it later. The field is absent when the item created no sub-entities.
        - `error` ProblemDetail
          - `type` string, required: Error type identifier.
          - `title` string, required: Short, human-readable summary of the problem type.
          - `detail` string, required: Detailed specific explanation of the problem.
      - object
        - `id` string: Echoes the caller-supplied correlation `id` from the corresponding request item, when one was supplied.
        - `status` string, required: @ExtensibleEnum Outcome status. `OK` indicates the monitor was created and published; any other value indicates failure and matches the corresponding error `type`.
        - `data` object: Present only when `status` is `OK`. Carries the URN of the created published monitor and the mapping from the request's temporary keys used inside keyed collections to the keys assigned to the sub-entities they created.
          - `urn` string, uri, required: A URN identifying the DQ monitor resource in the Data Quality API. Format: urn:ata:{tenant}:data-quality:dq-monitor:{uuid} Example: urn:ata:acme-corp:data-quality:dq-monitor:123e4567-e89b-12d3-a456-426614174000.
          - `correlationIds` object: Maps each temporary `new_<id>` key from your request to the key assigned to the sub-entity created under it, so you can resolve your temporary keys to the stored ones. The values are keys, not URNs: sub-entities such as export definitions have no URN of their own, and the key is what addresses the sub-entity when you retrieve the monitor or update it later. The field is absent when the item created no sub-entities.
        - `error` ProblemDetail, required
          - `type` string, required: Error type identifier.
          - `title` string, required: Short, human-readable summary of the problem type.
          - `detail` string, required: Detailed specific explanation of the problem.

## Other responses

- `400`: Bad request. The request parameters or body are invalid.
- `403`: Forbidden. You do not have permission to access the requested resource.

---

[API](https://skmtc.dev/ataccama/apis/ataccama-one-agentic-data-trust-platform-public-api.md) - [All operations](https://skmtc.dev/ataccama/apis/ataccama-one-agentic-data-trust-platform-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ataccama/apis/ataccama-one-agentic-data-trust-platform-public-api/revisions/46f16e0487f8?raw)
