openapi: 3.1.0
info:
  title: ONE Platform Public API - Catalog
  version: 1.0.0
  license:
    name: ATACCAMA PROPRIETARY/CONFIDENTIAL
    url: https://www.ataccama.com
servers:
  - url: https://server1.com/api
security:
  - JWT: []
paths:
  /catalog/v1/attributes:
    get:
      description: Lists published catalog attributes
      summary: List catalog attributes
      operationId: ListCatalogAttributes
      tags:
        - Catalog Attributes
      parameters:
        - in: query
          name: after
          schema:
            type: string
          description: Encoded string representing start of the next page. Starts at beginning when omitted.
          example: MA==
        - in: query
          name: size
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
        - in: query
          name: catalogItemUrn
          description: Filter attributes by parent catalog item
          schema:
            $ref: '#/components/schemas/CatalogItemUrn'
      responses:
        '200':
          description: Paginated list of published Catalog Attributes
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/PaginationMetadata'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CatalogAttribute'
        '400':
          $ref: '#/components/responses/ValidationError'
  /catalog/v1/catalog-items:
    get:
      description: Lists published catalog items
      summary: List catalog items
      operationId: ListCatalogItems
      tags:
        - Catalog Items
      parameters:
        - in: query
          name: after
          schema:
            type: string
          description: Encoded string representing start of the next page. Starts at beginning when omitted.
          example: MA==
        - in: query
          name: size
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Paginated list of published CatalogItems
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/PaginationMetadata'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CatalogItem'
        '400':
          $ref: '#/components/responses/ValidationError'
  /catalog/v1/catalog-items/filter:
    post:
      description: Lists published CatalogItems based on a filter passed in the body.
      summary: Filter catalog items
      operationId: FilterCatalogItems
      tags:
        - Catalog Items
      parameters:
        - in: query
          name: after
          schema:
            type: string
          description: Encoded string representing start of the next page. Starts at beginning when omitted.
          example: MA==
        - in: query
          name: size
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/CatalogItemFilter'
      responses:
        '200':
          description: Paginated list of published CatalogItems matching the search query
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/PaginationMetadata'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CatalogItem'
        '400':
          $ref: '#/components/responses/ValidationError'
  /catalog/v1/catalog-items/{urn}:
    get:
      description: Retrieves a published catalog item
      summary: Get catalog item
      operationId: GetCatalogItem
      tags:
        - Catalog Items
      parameters:
        - in: path
          name: urn
          required: true
          schema:
            $ref: '#/components/schemas/CatalogItemUrn'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogItem'
          description: A CatalogItem object
        '403':
          description: CatalogItem is forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      description: Updates an existing published catalog item, updating only specified fields as per JSON Merge Patch standard (RFC 7386)
      summary: Patch catalog item
      operationId: PatchCatalogItem
      tags:
        - Catalog Items
      parameters:
        - in: path
          name: urn
          required: true
          schema:
            $ref: '#/components/schemas/CatalogItemUrn'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CatalogItemPatch'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CatalogItem'
          description: CatalogItem updated
        '403':
          description: Permission denied
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      description: Deletes a catalog item and publishes that delete draft
      summary: Delete catalog item
      operationId: DeleteCatalogItem
      tags:
        - Catalog Items
      parameters:
        - in: path
          name: urn
          required: true
          schema:
            $ref: '#/components/schemas/CatalogItemUrn'
      responses:
        '204':
          description: CatalogItem deleted
        '403':
          description: Permission denied
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          $ref: '#/components/responses/NotFound'
  /catalog/v1/terms:
    get:
      description: Retrieve paginated published terms
      summary: List terms
      operationId: listTerms
      tags:
        - Terms
      parameters:
        - in: query
          name: after
          schema:
            type: string
          description: Encoded string representing start of the next page. Starts at beginning when omitted.
          example: MA==
        - in: query
          name: size
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Paginated list of terms
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/PaginationMetadata'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Term'
        '400':
          $ref: '#/components/responses/ValidationError'
        '403':
          description: Permission denied
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
  /catalog/v1/terms/{urn}:
    get:
      description: Retrieve a specific published term by URN.
      summary: Get term
      operationId: getTerm
      tags:
        - Terms
      parameters:
        - in: path
          name: urn
          required: true
          schema:
            $ref: '#/components/schemas/TermUrn'
      responses:
        '200':
          description: A Term
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Term'
        '403':
          description: Permission denied
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      description: Updates a specific term by URN, updating only specified fields as per JSON Merge Patch standard (RFC 7386)
      summary: Update term
      operationId: updateTerm
      tags:
        - Terms
      parameters:
        - in: path
          name: urn
          required: true
          schema:
            $ref: '#/components/schemas/TermUrn'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TermPatch'
        required: true
      responses:
        '200':
          description: Term patch object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Term'
        '403':
          description: Permission denied
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      description: Delete a specific term by URN.
      summary: Delete Term
      operationId: DeleteTerm
      tags:
        - Terms
      parameters:
        - in: path
          name: urn
          required: true
          schema:
            $ref: '#/components/schemas/TermUrn'
      responses:
        '204':
          description: Term successfully deleted
        '403':
          description: Permission denied
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          $ref: '#/components/responses/NotFound'
  /catalog/v1/terms/bulk:
    post:
      description: Create a batch of terms in the catalog and publish them.
      summary: Create Terms in Bulk
      operationId: CreateTermsInBulk
      tags:
        - Terms
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                terms:
                  type: array
                  items:
                    $ref: '#/components/schemas/NewTerm'
                  minItems: 1
                  maxItems: 100
              required:
                - terms
              example:
                terms:
                  - urn: urn:ata:acme-corp:catalog:term:676d90b8-4c9f-483b-a309-9f7b6b367f80
                    type: businessTerm
                    name: PII
                    description: Personally Identifiable Information
                    detectionRules:
                      operator: OR
                      ruleAssignments:
                        - detectionRuleUrn: urn:ata:acme-corp:catalog:detection-rule:576d90b8-4c9f-483b-a309-9f7b6b367f80
                          threshold: 80
                        - detectionRuleUrn: urn:ata:acme-corp:catalog:detection-rule:63c58461-1a6c-4d0c-9176-572c9b122d79
                  - urn: urn:ata:acme-corp:catalog:term:776d90b8-4c9f-483b-a309-9f7b6b367f80
                    type: securityTerm
                    name: Sensitive Data
                    detectionRules:
                      operator: AND
                      ruleAssignments:
                        - detectionRuleUrn: urn:ata:acme-corp:catalog:detection-rule:576d90b8-4c9f-483b-a309-9f7b6b367f80
        required: true
      responses:
        '201':
          description: List of created terms
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Term'
                required:
                  - data
        '400':
          $ref: '#/components/responses/ValidationError'
        '403':
          description: Permission denied
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
  /catalog/v1/documentation-flow/start:
    post:
      description: Start documentation flow asynchronously with given configuration on a connection
      summary: Start documentation flow
      operationId: StartDocumentationFlow
      tags:
        - Documentation Flow
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                configurationUrn:
                  $ref: '#/components/schemas/Urn'
                  description: Documentation flow configuration URN
                connectionUrn:
                  $ref: '#/components/schemas/Urn'
                  description: Connection URN
                paths:
                  type: array
                  items:
                    type: string
                  description: List of paths to run the documentation flow on. When omitted, the flow will run on whole connection.
              required:
                - configurationUrn
                - connectionUrn
      responses:
        '200':
          description: Documentation flow successfully started (asynchronously)
          content:
            application/json:
              schema:
                type: object
                properties:
                  workflowUrn:
                    $ref: '#/components/schemas/ProcessingWorkflowUrn'
                    description: Documentation flow workflow URN in processing center
                required:
                  - workflowUrn
        '403':
          description: Permission denied
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          $ref: '#/components/responses/NotFound'
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
    PaginationMetadata:
      type: object
      properties:
        next:
          type: string
          description: Encoded string representing the next page. Omitted if there are no more pages.
          example: MjA=
        total:
          type: integer
          format: int64
          description: Total number of items available across all pages.
          example: 150
    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
    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
    TermAssignment:
      type: object
      properties:
        termUrn:
          description: Assigned term Urn
          $ref: '#/components/schemas/TermUrn'
      required:
        - termUrn
    CatalogAttribute:
      type: object
      properties:
        catalogItemUrn:
          $ref: '#/components/schemas/CatalogItemUrn'
        urn:
          $ref: '#/components/schemas/CatalogAttributeUrn'
        name:
          type: string
        description:
          type: string
        columnType:
          type: string
        dataType:
          type: string
        comment:
          type: string
        termAssignments:
          type: array
          items:
            $ref: '#/components/schemas/TermAssignment'
      required:
        - urn
        - name
      example:
        catalogItemUrn: urn:ata:acme-corp:catalog:catalog-item:7764f356-1b8c-43f4-8e15-651feacfca1c
        urn: urn:ata:acme-corp:catalog:catalog-attribute:7764f356-1b8c-43f4-8e15-651feacfca1d
        name: customername
        dataType: STRING
        columnType: varchar
        description: This column contains the full names of customers
        termAssignments:
          - termUrn: urn:ata:acme-corp:catalog:term:3fa85f64-5717-4562-b3fc-2c963f66afa6
    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
    Urn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:(catalog|data-quality|processing|reference-data):[a-z0-9\-]+:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      description: |
        A Uniform Resource Name (URN) for Public API resources following RFC 8141.

        Format: urn:ata:{tenant}:{realm}:{resource-type}:{uuid}

        Components:
        - scheme: 'urn' (fixed)
        - namespace: 'ata' (Ataccama namespace identifier)
        - tenant: Tenant identifier from authentication context
        - realm: Realm identifier (eg. reference-data)
        - resource-type: Type of resource (eg. table, draft, published, etc.)
        - uuid: UUID (v4 or v7) of the resource
      example: urn:ata:acme-corp:reference-data:table:123e4567-e89b-12d3-a456-426614174000
    CatalogLocation:
      type: object
      properties:
        name:
          type: string
          description: Location name
        description:
          type: string
          description: Location description
      required:
        - name
    SourceUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:catalog:source:[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 Source resource in the Catalog API.

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

        Example: urn:ata:acme-corp:catalog:source:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:catalog:source:123e4567-e89b-12d3-a456-426614174000
    GroupUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:iam:group:[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 Group resource in the IAM API.

        Format: urn:ata:{tenant}:iam:group:{uuid}

        Example: urn:ata:acme-corp:iam:group:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:iam:group: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
    CatalogAlias:
      type: object
      properties:
        type:
          type: string
        value:
          type: string
      required:
        - type
    CatalogItem:
      type: object
      properties:
        urn:
          $ref: '#/components/schemas/CatalogItemUrn'
        name:
          type: string
        description:
          type: string
        originPath:
          type: string
        connection:
          type: object
          description: Connection to the system this item is located in
          properties:
            urn:
              $ref: '#/components/schemas/Urn'
          required:
            - urn
        termAssignments:
          type: array
          items:
            $ref: '#/components/schemas/TermAssignment'
        locations:
          type: array
          items:
            $ref: '#/components/schemas/CatalogLocation'
        source:
          type: object
          properties:
            urn:
              $ref: '#/components/schemas/SourceUrn'
          required:
            - urn
        effectiveStewardship:
          type: object
          description: Effective stewardship on this item either directly assigned or inherited
          properties:
            groupUrn:
              $ref: '#/components/schemas/GroupUrn'
          required:
            - groupUrn
        primaryDqMonitor:
          type: object
          description: Primary Dq monitor for this catalog item
          properties:
            urn:
              $ref: '#/components/schemas/DqMonitorUrn'
        aliases:
          type: array
          items:
            $ref: '#/components/schemas/CatalogAlias'
      required:
        - name
      example:
        urn: urn:ata:acme-corp:catalog:catalog-item:fde84300-7a83-4d24-8c88-30ada80b0b54
        name: customers
        description: This table contains information about our customers
        originPath: public/customers
        connection:
          urn: urn:ata:acme-corp:todo:connection:b812d964-f94e-4be7-85c3-0073742ade09
        termAssignments:
          - termUrn: urn:ata:acme-corp:catalog:term:1ede1262-f76b-4d00-9929-e92c15d8a5ba
          - termUrn: urn:ata:acme-corp:catalog:term:3fa85f64-5717-4562-b3fc-2c963f66afa6
        locations:
          - name: public
          - name: CustomerDB
            description: This database contains all customer related data
        source:
          urn: urn:ata:acme-corp:catalog:source:28e3ca71-635b-43c4-9d1b-bc9cc642721f
        effectiveStewardship:
          groupUrn: urn:ata:acme-corp:iam:group:7c9e6679-7425-40de-944b-e07fc1f90ae7
        primaryDqMonitor:
          urn: urn:ata:acme-corp:data-quality:dq-monitor:3c9e6679-7425-40de-944b-e07fc1f90ae7
        aliases:
          - type: COLLIBRA_ASSET_ID
            value: 123e4567-e89b-12d3-a456-426614174000
    CatalogItemFilter:
      type: object
      properties:
        and:
          type: array
          items:
            $ref: '#/components/schemas/CatalogItemFilter'
        or:
          type: array
          items:
            $ref: '#/components/schemas/CatalogItemFilter'
        urn:
          $ref: '#/components/schemas/IdFilter'
        name:
          $ref: '#/components/schemas/StringFilter'
        description:
          $ref: '#/components/schemas/StringFilter'
        originPath:
          $ref: '#/components/schemas/StringFilter'
        connection:
          type: object
          properties:
            urn:
              $ref: '#/components/schemas/IdFilter'
            name:
              $ref: '#/components/schemas/StringFilter'
        source:
          type: object
          properties:
            urn:
              $ref: '#/components/schemas/IdFilter'
            name:
              $ref: '#/components/schemas/StringFilter'
        aliases:
          type: object
          properties:
            any:
              type: object
              properties:
                type:
                  $ref: '#/components/schemas/StringFilter'
                value:
                  $ref: '#/components/schemas/StringFilter'
        attributes:
          type: object
          properties:
            any:
              $ref: '#/components/schemas/CatalogAttributeFilter'
        termAssignments:
          type: object
          properties:
            any:
              $ref: '#/components/schemas/TermAssignmentFilter'
      example:
        or:
          - aliases:
              any:
                type:
                  equals: COLLIBRA_ASSET_ID
                value:
                  in:
                    - 8e106021-3655-463a-8884-6c7c6c315548
            or:
              - name:
                  in:
                    - customer
                    - customers
              - termAssignments:
                  any:
                    termUrn:
                      in:
                        - urn:ata:acme-corp:catalog:term:9e106021-3655-463a-8884-6c7c6c315548
          - and:
              - source:
                  name:
                    contains: Sales
              - source:
                  name:
                    notIn:
                      - Sales USA
                      - Sales Canada
    IdFilter:
      type: object
      properties:
        equals:
          $ref: '#/components/schemas/Urn'
        notEquals:
          $ref: '#/components/schemas/Urn'
        in:
          type: array
          items:
            $ref: '#/components/schemas/Urn'
        notIn:
          type: array
          items:
            $ref: '#/components/schemas/Urn'
    StringFilter:
      type: object
      properties:
        contains:
          type: string
        notContains:
          type: string
        equals:
          type: string
        notEquals:
          type: string
        isNull:
          type: boolean
        isNotNull:
          type: boolean
        in:
          type: array
          items:
            type: string
        notIn:
          type: array
          items:
            type: string
    CatalogAttributeFilter:
      type: object
      properties:
        and:
          type: array
          items:
            $ref: '#/components/schemas/CatalogAttributeFilter'
        or:
          type: array
          items:
            $ref: '#/components/schemas/CatalogAttributeFilter'
        urn:
          $ref: '#/components/schemas/IdFilter'
        name:
          $ref: '#/components/schemas/StringFilter'
        description:
          $ref: '#/components/schemas/StringFilter'
        columnType:
          $ref: '#/components/schemas/StringFilter'
        dataType:
          $ref: '#/components/schemas/StringFilter'
        comment:
          $ref: '#/components/schemas/StringFilter'
        termAssignments:
          type: object
          properties:
            any:
              $ref: '#/components/schemas/TermAssignmentFilter'
    TermAssignmentFilter:
      type: object
      properties:
        termUrn:
          $ref: '#/components/schemas/IdFilter'
    CatalogItemPatch:
      type: object
      properties:
        description:
          type:
            - string
            - 'null'
        stewardshipGroupUrn:
          description: Urn of the group responsible for stewardship of this item
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/GroupUrn'
        aliases:
          description: Alternative names or identifiers for the catalog item, e.g. from from other catalogs. The whole array will be replaced during update if not omitted.
          oneOf:
            - type: 'null'
            - type: array
              items:
                $ref: '#/components/schemas/CatalogAlias'
      example:
        description: This is an updated description of the catalog item.
        stewardshipGroupUrn: urn:ata:acme-corp:iam:group:123e4567-e89b-12d3-a456-426614174000
        aliases:
          - type: COLLIBRA_ASSET_ID
            value: a23e4567-e89b-12d3-a456-426614174000
    RulesOperator:
      type: string
      examples:
        - AND
        - OR
      description: '@ExtensibleEnum Logical operator to combine multiple rules'
    DetectionRuleUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:catalog:detection-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 a Detection rule resource in the Catalog API.

        Format: urn:ata:{tenant}:catalog:detection-rule:{uuid}

        Example: urn:ata:acme-corp:catalog:detection-rule:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:catalog:detection-rule:123e4567-e89b-12d3-a456-426614174000
    DetectionRuleAssignment:
      type: object
      properties:
        detectionRuleUrn:
          $ref: '#/components/schemas/DetectionRuleUrn'
        threshold:
          type: number
          format: float
          minimum: 0
          maximum: 100
          description: Threshold for the detection rule (if applicable)
      required:
        - detectionRuleUrn
    TermDetectionRules:
      type: object
      properties:
        operator:
          $ref: '#/components/schemas/RulesOperator'
        ruleAssignments:
          type: array
          items:
            $ref: '#/components/schemas/DetectionRuleAssignment'
    AttributeToCatalogItemTermRule:
      type: object
      properties:
        operator:
          $ref: '#/components/schemas/RulesOperator'
        terms:
          type: array
          items:
            $ref: '#/components/schemas/TermAssignment'
    AttributeToCatalogItemTermRules:
      type: object
      properties:
        operator:
          $ref: '#/components/schemas/RulesOperator'
        rules:
          type: array
          items:
            $ref: '#/components/schemas/AttributeToCatalogItemTermRule'
    TermBase:
      type: object
      properties:
        type:
          type: string
          description: The exact type of term
          example: businessTerm
        name:
          type: string
        description:
          type: string
        detectionRules:
          $ref: '#/components/schemas/TermDetectionRules'
        attributeToCatalogItemTermRules:
          $ref: '#/components/schemas/AttributeToCatalogItemTermRules'
      required:
        - name
        - type
    Term:
      allOf:
        - type: object
          properties:
            urn:
              $ref: '#/components/schemas/TermUrn'
          required:
            - urn
        - $ref: '#/components/schemas/TermBase'
    TermPatch:
      type: object
      properties:
        name:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        detectionRules:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                operator:
                  oneOf:
                    - type: 'null'
                    - $ref: '#/components/schemas/RulesOperator'
                ruleAssignments:
                  oneOf:
                    - type: 'null'
                    - type: array
                      items:
                        $ref: '#/components/schemas/DetectionRuleAssignment'
        attributeToCatalogItemTermRules:
          oneOf:
            - type: 'null'
            - type: object
              properties:
                operator:
                  oneOf:
                    - type: 'null'
                    - $ref: '#/components/schemas/RulesOperator'
                rules:
                  oneOf:
                    - type: 'null'
                    - type: array
                      items:
                        $ref: '#/components/schemas/AttributeToCatalogItemTermRule'
      required: []
    NewTerm:
      allOf:
        - $ref: '#/components/schemas/TermBase'
    ProcessingWorkflowUrn:
      type: string
      format: uri
      pattern: ^urn:ata:[a-z0-9][a-z0-9\-]{0,62}:processing:workflow:[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 Processing Workflow.

        Format: urn:ata:{tenant}:processing:workflow:{uuid}

        Example: urn:ata:acme-corp:processing:workflow:123e4567-e89b-12d3-a456-426614174000
      example: urn:ata:acme-corp:processing:workflow:123e4567-e89b-12d3-a456-426614174000
  responses:
    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'
    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
