openapi: 3.1.0
info:
  title: ONE Platform Public API - Data Quality
  version: 1.0.0
  license:
    name: ATACCAMA PROPRIETARY/CONFIDENTIAL
    url: https://www.ataccama.com
servers:
  - url: https://server1.com/api
security:
  - JWT: []
paths:
  /data-quality/v1/catalog-items/{catalogItemUrn}/dq-monitors/{dqMonitorUrn}/processings:
    get:
      description: Lists processings for given catalog item and DQ monitor.
      summary: List processings
      operationId: ListProcessings
      tags:
        - Data Quality Results
      parameters:
        - in: path
          name: catalogItemUrn
          required: true
          schema:
            $ref: '#/components/schemas/CatalogItemUrn'
          description: Catalog item URN
        - in: path
          name: dqMonitorUrn
          required: true
          schema:
            $ref: '#/components/schemas/DqMonitorUrnOrPrimary'
          description: DQ monitor URN, or "primary" to get the primary DQ monitor
        - name: after
          in: query
          schema:
            type: string
          description: Cursor for forward pagination. Encoded string representing the position after which to fetch results.
        - name: before
          in: query
          schema:
            type: string
          description: Cursor for backward pagination. Encoded string representing the position before which to fetch results.
        - name: size
          in: query
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
          description: Number of records to return per page
        - name: sort
          in: query
          schema:
            type: string
            default: '-finishedAt'
          description: Comma-separated field names (e.g., "sort=processingState,-finishedAt"), where fields prefixed with "-" sort descending
        - name: from
          in: query
          schema:
            type: string
            format: date-time
          description: Start of the filtered time range
        - name: to
          in: query
          schema:
            type: string
            format: date-time
          description: End of the filtered time range
        - name: state
          in: query
          schema:
            type: string
          description: Processing state to be filtered
      responses:
        '200':
          description: Paginated list of processings
          content:
            application/json:
              schema:
                type: object
                description: Paginated list of processings
                properties:
                  meta:
                    $ref: '#/components/schemas/CursorPaginationMetadata'
                  data:
                    type: array
                    description: Array of processing objects
                    items:
                      $ref: '#/components/schemas/Processing'
                required:
                  - meta
                  - data
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /data-quality/v1/catalog-items/{catalogItemUrn}/dq-monitors/{dqMonitorUrn}/processings/{processingUrn}/dq-results:
    get:
      description: Gets DQ results for given catalog item, DQ monitor and processing. Mind that catalog item attributes correspond to the version valid at the time of start of the given processing.
      summary: Get DQ results
      operationId: GetDqResults
      tags:
        - Data Quality Results
      parameters:
        - in: path
          name: catalogItemUrn
          required: true
          schema:
            $ref: '#/components/schemas/CatalogItemUrn'
          description: Catalog item URN
        - in: path
          name: dqMonitorUrn
          required: true
          schema:
            $ref: '#/components/schemas/DqMonitorUrnOrPrimary'
          description: DQ monitor URN, or "primary" to get the primary DQ monitor
        - name: processingUrn
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/ProcessingUrnOrLatest'
          description: Processing URN, or "latest" to get the latest processing
        - name: attributeUrns
          in: query
          schema:
            type: array
            items:
              $ref: '#/components/schemas/CatalogAttributeUrn'
          description: Attribute URNs, if one wants to get results only for specific attributes. If not provided, results for all attributes will be returned.
      responses:
        '200':
          description: DQ results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DqResults'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /data-quality/v1/catalog-items/{catalogItemUrn}/dq-monitors/{dqMonitorUrn}/processings/{processingUrn}/invalid-samples/headers:
    get:
      description: Gets invalid sample headers for the given catalog item, DQ monitor and processing. Mind that catalog item attributes correspond to the version valid at the time of start of the given processing.
      summary: Get invalid sample headers
      operationId: GetInvalidSampleHeaders
      tags:
        - Data Quality Results
      parameters:
        - in: path
          name: catalogItemUrn
          required: true
          schema:
            $ref: '#/components/schemas/CatalogItemUrn'
          description: Catalog item URN
        - in: path
          name: dqMonitorUrn
          required: true
          schema:
            $ref: '#/components/schemas/DqMonitorUrnOrPrimary'
          description: DQ monitor URN, or "primary" to get the primary DQ monitor
        - in: path
          name: processingUrn
          required: true
          schema:
            $ref: '#/components/schemas/ProcessingUrnOrLatest'
          description: Processing URN, or "latest" to get the latest processing
      responses:
        '200':
          description: List of invalid sample headers
          content:
            application/json:
              schema:
                type: object
                description: List of invalid sample headers
                properties:
                  headers:
                    type: array
                    items:
                      $ref: '#/components/schemas/InvalidSampleHeader'
                required:
                  - headers
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /data-quality/v1/catalog-items/{catalogItemUrn}/dq-monitors/{dqMonitorUrn}/processings/{processingUrn}/invalid-samples:
    get:
      description: Gets invalid samples for the given catalog item, DQ monitor and processing. Use /invalid-samples/headers resource to get the list of headers. Mind that catalog item attributes correspond to the version valid at the time of start of the given processing.
      summary: Get invalid samples
      operationId: GetInvalidSamples
      tags:
        - Data Quality Results
      parameters:
        - in: path
          name: catalogItemUrn
          required: true
          schema:
            $ref: '#/components/schemas/CatalogItemUrn'
          description: Catalog item URN
        - in: path
          name: dqMonitorUrn
          required: true
          schema:
            $ref: '#/components/schemas/DqMonitorUrnOrPrimary'
          description: DQ monitor URN, or "primary" to get the primary DQ monitor
        - in: path
          name: processingUrn
          required: true
          schema:
            $ref: '#/components/schemas/ProcessingUrnOrLatest'
          description: Processing URN, or "latest" to get the latest processing
        - name: after
          in: query
          schema:
            type: string
          description: Cursor for forward pagination. Encoded string representing the position after which to fetch results.
        - name: before
          in: query
          schema:
            type: string
          description: Cursor for backward pagination. Encoded string representing the position before which to fetch results.
        - name: size
          in: query
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
          description: Number of records to return per page
      responses:
        '200':
          description: Paginated list of invalid samples
          content:
            application/json:
              schema:
                type: object
                description: Paginated list of invalid samples
                properties:
                  meta:
                    $ref: '#/components/schemas/CursorPaginationMetadata'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/InvalidSampleRow'
                required:
                  - meta
                  - data
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /data-quality/v1/dq-results/bulk:
    post:
      description: Gets latest DQ results for multiple catalog items and given DQ monitors.
      summary: Get DQ results in bulk
      operationId: GetDqResultsBulk
      tags:
        - Data Quality Results
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Request payload for bulk DQ results.
              properties:
                filter:
                  type: array
                  minItems: 1
                  maxItems: 100
                  items:
                    $ref: '#/components/schemas/CatalogItemDqMonitorPair'
              required:
                - filter
      responses:
        '200':
          description: Bulk DQ results
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DqResultsBulkItem'
                required:
                  - data
        '400':
          $ref: '#/components/responses/ValidationError'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /data-quality/v1/catalog-items/{catalogItemUrn}/dq-monitors/{dqMonitorUrn}:
    get:
      description: Retrieves the DQ Monitor in Published state. Retrieves the primary DQ Monitor if "primary" used instead of dqMonitorUrn.
      operationId: GetCatalogItemDqMonitor
      tags:
        - Data Quality Monitors
      parameters:
        - in: path
          name: catalogItemUrn
          required: true
          schema:
            $ref: '#/components/schemas/CatalogItemUrn'
          description: Catalog item URN
        - in: path
          name: dqMonitorUrn
          required: true
          schema:
            $ref: '#/components/schemas/DqMonitorUrnOrPrimary'
          description: DQ monitor URN, or "primary" to get the primary DQ monitor
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DqMonitor'
          description: A DQ monitor object
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      summary: Get DQ monitor by URN, or the primary DQ monitor
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    CatalogItemUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:catalog:catalog-item:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        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
      example: urn:ata:acme-corp:catalog:catalog-item:123e4567-e89b-12d3-a456-426614174000
    DqMonitorUrnOrPrimary:
      type: string
      format: uri
      pattern: ^(primary|urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:dq-monitor:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
      description: |
        A URN identifying the DQ Monitor resource in the Data Quality API or "primary" used as an input parameter for API to find the primary DQ Monitor for client.

        Format: urn:ata:{tenant}:data-quality:dq-monitor:{uuid}

        Example values:
          - primary
          - urn:ata:acme-corp:data-quality:dq-monitor:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:dq-monitor:123e4567-e89b-12d3-a456-426614174000
    CursorPaginationMetadata:
      type: object
      description: Pagination metadata for cursor-based pagination
      properties:
        prev:
          type:
            - string
            - 'null'
          description: Cursor for previous page. Use with 'before' query parameter. Null on first page.
        next:
          type:
            - string
            - 'null'
          description: Cursor for next page. Use with 'after' query parameter. Null on last page.
        total:
          type: integer
          description: Optional total count of items.
      required:
        - prev
        - next
    ProcessingUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:processing:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the DQ processing run in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:processing:{uuid}

        Example: urn:ata:acme-corp:data-quality:processing:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:processing:123e4567-e89b-12d3-a456-426614174000
    DqMonitorUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:dq-monitor:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        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
      example: urn:ata:acme-corp:data-quality:dq-monitor:123e4567-e89b-12d3-a456-426614174000
    Processing:
      type: object
      properties:
        processingUrn:
          $ref: '#/components/schemas/ProcessingUrn'
        startedAt:
          type: string
          format: date-time
          description: Timestamp when the processing started
          example: '2025-01-15T09:30:00Z'
        finishedAt:
          type: string
          format: date-time
          description: Timestamp when the processing finished
          example: '2025-01-15T10:00:00Z'
        dqMonitorUrn:
          $ref: '#/components/schemas/DqMonitorUrn'
        catalogItemUrn:
          $ref: '#/components/schemas/CatalogItemUrn'
        processingState:
          type: string
          examples:
            - SUCCESS
            - FAILED
            - CANCELED
            - IN_PROGRESS
            - UNKNOWN
          description: '@ExtensibleEnum State of the processing'
    ProblemDetail:
      type: object
      properties:
        type:
          type: string
          description: Error type identifier
          example: RESOURCE_NOT_FOUND
        title:
          type: string
          description: Short, human-readable summary of the problem type
          example: Resource Not Found
        detail:
          type: string
          description: Detailed specific explanation of the problem
          example: Table 'urn:ata:acme:reference-data:tables:01924b84-6f7e-7c0c-8f9d-3a2b4c5d6e7f' was not found
      required:
        - type
        - title
        - detail
    ProcessingUrnOrLatest:
      type: string
      format: uri
      pattern: ^(latest|urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:processing:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
      description: |
        A URN identifying the DQ processing run in the Data Quality API or "latest" used as an input parameter for API to find the latest DQ processing for client.

        Format: urn:ata:{tenant}:data-quality:processing:{uuid}

        Example values:
          - latest
          - urn:ata:acme-corp:data-quality:processing:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:processing:123e4567-e89b-12d3-a456-426614174000
    CatalogAttributeUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:catalog:catalog-attribute:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        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
      example: urn:ata:acme-corp:catalog:catalog-attribute:123e4567-e89b-12d3-a456-426614174000
    OverallQuality:
      type: object
      properties:
        passedCount:
          type: integer
          format: int64
        failedCount:
          type: integer
          format: int64
    DimensionUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:dimension:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the dimension resource in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:dimension:{uuid}

        Example: urn:ata:acme-corp:data-quality:dimension:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:dimension:123e4567-e89b-12d3-a456-426614174000
    DimensionResultUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:dimension-result:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the dimension result resource in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:dimension-result:{uuid}

        Example: urn:ata:acme-corp:data-quality:dimension-result:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:dimension-result:123e4567-e89b-12d3-a456-426614174000
    DimensionResult:
      type: object
      properties:
        urn:
          $ref: '#/components/schemas/DimensionResultUrn'
        name:
          type: string
        passedOverallResult:
          type: boolean
      required:
        - name
        - passedOverallResult
    Dimension:
      type: object
      properties:
        urn:
          $ref: '#/components/schemas/DimensionUrn'
        name:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/DimensionResult'
      required:
        - name
    DimensionProcessingResult:
      type: object
      properties:
        dimension:
          $ref: '#/components/schemas/Dimension'
        passedCount:
          type: integer
          format: int64
        failedCount:
          type: integer
          format: int64
        ruleInstanceCount:
          type: integer
    RuleInstanceUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:rule-instance:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the Rule Instance resource in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:rule-instance:{uuid}

        Example: urn:ata:acme-corp:data-quality:rule-instance:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:rule-instance:123e4567-e89b-12d3-a456-426614174000
    RuleUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:rule:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the data quality Rule resource in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:rule:{uuid}

        Example: urn:ata:acme-corp:data-quality:rule:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:rule:123e4567-e89b-12d3-a456-426614174000
    RuleInstanceResult:
      type: object
      properties:
        count:
          type: integer
          format: int64
        result:
          $ref: '#/components/schemas/DimensionResult'
    ExplanationUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:explanation:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the DQ result explanation resource in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:explanation:{uuid}

        Example: urn:ata:acme-corp:data-quality:explanation:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:explanation:123e4567-e89b-12d3-a456-426614174000
    Explanation:
      type: object
      properties:
        urn:
          $ref: '#/components/schemas/ExplanationUrn'
        name:
          type: string
        count:
          type: integer
          format: int64
    RuleInstanceProcessingResult:
      type: object
      properties:
        ruleInstanceUrn:
          $ref: '#/components/schemas/RuleInstanceUrn'
        ruleUrn:
          $ref: '#/components/schemas/RuleUrn'
        ruleInstanceName:
          type: string
        ruleName:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/RuleInstanceResult'
        explanations:
          type: array
          items:
            $ref: '#/components/schemas/Explanation'
    DqAttributeResults:
      type: object
      properties:
        attributeUrn:
          $ref: '#/components/schemas/CatalogAttributeUrn'
        attributeName:
          type: string
          description: Name of the attribute.
        overallQuality:
          $ref: '#/components/schemas/OverallQuality'
        dimensionResults:
          type: array
          items:
            $ref: '#/components/schemas/DimensionProcessingResult'
        ruleInstanceResults:
          type: array
          items:
            $ref: '#/components/schemas/RuleInstanceProcessingResult'
    DqResults:
      type: object
      description: DQ results for a processing.
      properties:
        processingUrn:
          $ref: '#/components/schemas/ProcessingUrn'
        overallQuality:
          $ref: '#/components/schemas/OverallQuality'
        dimensionResults:
          type: array
          items:
            $ref: '#/components/schemas/DimensionProcessingResult'
        catalogItemLink:
          type: string
          format: uri
          description: Link to the catalog item in the Ataccama ONE platform.
        dqResultsLink:
          type: string
          format: uri
          description: Link to DQ results in the Ataccama ONE platform.
        invalidSamplesLink:
          type: string
          format: uri
          description: Link to invalid samples (records that failed the DQ evaluation) in the Ataccama ONE platform.
        dqAttributeResults:
          type: array
          items:
            $ref: '#/components/schemas/DqAttributeResults'
      required:
        - processingUrn
    InvalidSampleHeader:
      type: object
      properties:
        attributeUrn:
          $ref: '#/components/schemas/CatalogAttributeUrn'
        attributeName:
          type: string
          description: Name of the attribute.
        columnType:
          type: string
          description: Source column type, e.g., VARCHAR, NUMBER.
        dataType:
          type: string
          description: Data type of the attribute, e.g., STRING, LONG.
        protection:
          type: string
          examples:
            - PROTECTED
            - CLASSIFIED
            - UNCLASSIFIED
          description: '@ExtensibleEnum Protection/Classification level of the attribute'
      required:
        - attributeName
    InvalidRuleInstance:
      type: object
      properties:
        ruleInstanceUrn:
          $ref: '#/components/schemas/RuleInstanceUrn'
        explanation:
          type: string
    InvalidSampleRow:
      type: object
      required:
        - recordId
        - values
      properties:
        recordId:
          type: integer
          format: int64
        values:
          type: array
          items:
            type: string
        invalidRuleInstances:
          type: array
          items:
            $ref: '#/components/schemas/InvalidRuleInstance'
    CatalogItemDqMonitorPair:
      type: object
      description: Identifies the catalog item and it's DQ monitor.
      properties:
        catalogItemUrn:
          $ref: '#/components/schemas/CatalogItemUrn'
        dqMonitorUrn:
          $ref: '#/components/schemas/DqMonitorUrn'
      required:
        - catalogItemUrn
        - dqMonitorUrn
    DimensionProcessingResultNoEnrichment:
      type: object
      properties:
        dimensionUrn:
          $ref: '#/components/schemas/DimensionUrn'
        passedCount:
          type: integer
          format: int64
        failedCount:
          type: integer
          format: int64
        ruleInstanceCount:
          type: integer
    DqResultsBulkItem:
      allOf:
        - $ref: '#/components/schemas/CatalogItemDqMonitorPair'
        - type: object
          description: DQ results from the latest processing.
          properties:
            processingUrn:
              $ref: '#/components/schemas/ProcessingUrn'
            processingStartedAt:
              type: string
              format: date-time
              description: Timestamp when the processing started
              example: '2025-01-15T09:30:00Z'
            processingFinishedAt:
              type: string
              format: date-time
              description: Timestamp when the processing finished
              example: '2025-01-15T10:00:00Z'
            overallQuality:
              $ref: '#/components/schemas/OverallQuality'
            dimensionResults:
              type: array
              items:
                $ref: '#/components/schemas/DimensionProcessingResultNoEnrichment'
          required:
            - processingUrn
    EntityBase:
      type: object
      properties:
        status:
          type: string
          examples:
            - PUBLISHED
          description: '@ExtensibleEnum The lifecycle status of the entity'
    RuleParameterUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:rule-parameter:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the data quality rule parameter resource in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:rule-parameter:{uuid}

        Example: urn:ata:acme-corp:data-quality:rule-parameter:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:rule-parameter:123e4567-e89b-12d3-a456-426614174000
    RuleParameterInstance:
      type: object
      properties:
        value:
          type: string
        ruleParameterUrn:
          $ref: '#/components/schemas/RuleParameterUrn'
        ruleParameterName:
          type: string
      required:
        - value
        - ruleParameterUrn
    RuleInstance:
      type: object
      properties:
        ruleInstanceUrn:
          $ref: '#/components/schemas/RuleInstanceUrn'
        ruleUrn:
          $ref: '#/components/schemas/RuleUrn'
        ruleInstanceName:
          type: string
        ruleName:
          type: string
        parameterValues:
          type: array
          items:
            $ref: '#/components/schemas/RuleParameterInstance'
    RuleAttributeUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:rule-attribute:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the data quality rule attribute resource in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:rule-attribute:{uuid}

        Example: urn:ata:acme-corp:data-quality:rule-attribute:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:rule-attribute:123e4567-e89b-12d3-a456-426614174000
    RuleMapping:
      type: object
      properties:
        catalogItemAttributeUrn:
          $ref: '#/components/schemas/CatalogAttributeUrn'
          description: Catalog item attribute URN
        ruleAttributeUrn:
          $ref: '#/components/schemas/RuleAttributeUrn'
          description: Rule input attribute URN
      required:
        - catalogItemAttributeUrn
        - ruleAttributeUrn
    RuleInstanceWithMapping:
      allOf:
        - $ref: '#/components/schemas/RuleInstance'
        - type: object
          properties:
            mappings:
              type: array
              items:
                $ref: '#/components/schemas/RuleMapping'
            enabled:
              type: boolean
          required:
            - enabled
    InvalidSamplesConfiguration:
      type: object
      properties:
        enabled:
          type: boolean
        sampleSize:
          type: integer
      required:
        - enabled
    TermInstanceUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:term-instance:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the Term Instance resource in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:term-instance:{uuid}

        Example: urn:ata:acme-corp:data-quality:term-instance:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:term-instance:123e4567-e89b-12d3-a456-426614174000
    TermUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:catalog:term:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying a Term resource in the Catalog API.

        Format: urn:ata:{tenant}:catalog:term:{uuid}

        Example: urn:ata:acme-corp:catalog:term:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:catalog:term:123e4567-e89b-12d3-a456-426614174000
    TermInstance:
      type: object
      properties:
        termInstanceUrn:
          $ref: '#/components/schemas/TermInstanceUrn'
        termUrn:
          $ref: '#/components/schemas/TermUrn'
        termName:
          type: string
    TermRuleInstance:
      allOf:
        - $ref: '#/components/schemas/RuleInstanceWithMapping'
        - type: object
          properties:
            terms:
              type: array
              items:
                $ref: '#/components/schemas/TermInstance'
    ScheduleUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:data-quality:schedule:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A URN identifying the Schedule resource in the Data Quality API.

        Format: urn:ata:{tenant}:data-quality:schedule:{uuid}

        Example: urn:ata:acme-corp:data-quality:schedule:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:data-quality:schedule:123e4567-e89b-12d3-a456-426614174000
    Schedule:
      type: object
      properties:
        urn:
          $ref: '#/components/schemas/ScheduleUrn'
        cronExpression:
          type: string
        enabled:
          type: boolean
        ignoreMisfires:
          type: boolean
        description:
          type: string
        timeZone:
          type: string
        startAt:
          type: string
          format: date-time
          description: Timestamp to start the schedule from
          example: '2025-01-15T09:30:00Z'
        endAt:
          type: string
          format: date-time
          description: Timestamp to end the schedule or not present for no end
          example: '2025-01-15T09:30:00Z'
        priority:
          type: integer
        nextRun:
          type: string
          format: date-time
          description: Timestamp of the next scheduled run
          example: '2025-01-15T09:30:00Z'
      required:
        - cronExpression
        - enabled
        - ignoreMisfires
        - timeZone
    AnomalyDetectionConfiguration:
      type: object
      properties:
        enabled:
          type: boolean
      required:
        - enabled
    ProfilingConfiguration:
      type: object
      properties:
        enabled:
          type: boolean
        type:
          type: string
        sampleLimitCount:
          type: integer
        sampleLimitPercentage:
          type: integer
      required:
        - enabled
        - type
    DqMonitorExportDefinition:
      type: object
      properties:
        name:
          type: string
          description: The name of the export definition.
        type:
          type: string
          description: The type of export. Currently only "INVALID_RECORDS" (export invalid records found during DQ evaluation).
        format:
          type: string
          description: The format of the export. Either "CSV" (saved to a CSV file you can download after DQ evaluation), or "DATABASE" (exported to a target database location).
        limit:
          type: integer
          description: The maximum number of records to export. If the number of invalid records exceeds this limit, only the first 'limit' records are exported.
        targetLocation:
          type: array
          items:
            type: string
          description: The target location for the export. For "DATABASE" format, this is a target schema and table name. For "CSV" format, this is an empty array (`invalidRecordsDownloadLink` can be found in DQ results).
        attributeUrns:
          type: array
          items:
            $ref: '#/components/schemas/CatalogAttributeUrn'
          description: Additional attributes.
        enabled:
          type: boolean
          description: Whether the export definition is enabled.
      required:
        - name
        - type
        - limit
        - targetLocation
        - enabled
    DqMonitor:
      allOf:
        - $ref: '#/components/schemas/EntityBase'
        - type: object
          properties:
            urn:
              $ref: '#/components/schemas/DqMonitorUrn'
            name:
              type: string
            manualRuleInstances:
              type: array
              items:
                $ref: '#/components/schemas/RuleInstanceWithMapping'
            invalidSamplesConfiguration:
              $ref: '#/components/schemas/InvalidSamplesConfiguration'
            termRuleInstances:
              type: array
              items:
                $ref: '#/components/schemas/TermRuleInstance'
            schedule:
              $ref: '#/components/schemas/Schedule'
            anomalyDetectionConfiguration:
              $ref: '#/components/schemas/AnomalyDetectionConfiguration'
            profilingConfiguration:
              $ref: '#/components/schemas/ProfilingConfiguration'
            catalogItemUrn:
              $ref: '#/components/schemas/CatalogItemUrn'
            exportDefinitions:
              type: array
              items:
                $ref: '#/components/schemas/DqMonitorExportDefinition'
          required:
            - name
            - catalogItemUrn
  responses:
    Forbidden:
      description: Forbidden - insufficient permissions to access the requested resource
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/ProblemDetail'
              - type: object
                properties:
                  type:
                    type: string
                    const: FORBIDDEN
                    description: Error type identifier for forbidden access
                  title:
                    type: string
                    const: Forbidden
                    description: Short, human-readable summary of the problem type
                required:
                  - type
                  - title
          example:
            type: FORBIDDEN
            title: Forbidden
            detail: You do not have permission to access this resource.
    NotFound:
      description: Resource not found
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/ProblemDetail'
              - type: object
                properties:
                  type:
                    type: string
                    const: RESOURCE_NOT_FOUND
                    description: Error type identifier for not found resources
                  title:
                    type: string
                    const: Resource Not Found
                    description: Short, human-readable summary of the problem type
                required:
                  - type
                  - title
          example:
            type: RESOURCE_NOT_FOUND
            title: Resource Not Found
            detail: Table 'urn:ata:acme:reference-data:tables:01924b84-6f7e-7c0c-8f9d-3a2b4c5d6e7f' was not found
    ValidationError:
      description: Bad request
      content:
        application/problem+json:
          schema:
            allOf:
              - $ref: '#/components/schemas/ProblemDetail'
              - type: object
                properties:
                  type:
                    type: string
                    const: VALIDATION_ERROR
                    description: Error type identifier for validation errors
                  title:
                    type: string
                    const: Validation Error
                    description: Short, human-readable summary of the problem type
                  errors:
                    type: array
                    description: Optional array of detailed validation errors
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                          description: Specific error message for this validation failure
                        pointer:
                          type: string
                          description: JSON Pointer (RFC 6901) to the field that caused the error
                      required:
                        - detail
                        - pointer
                required:
                  - type
                  - title
          example:
            type: VALIDATION_ERROR
            title: Validation Error
            detail: The request body contains invalid parameters.
            errors:
              - detail: Email address is required
                pointer: '#/email'
              - detail: Postal code must be exactly 5 digits
                pointer: '#/shippingAddress/postalCode'
