> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview publishing to the catalog

> A dry run against the data catalog: every write publishing this version would make, what stays in the registry, and catalog edits made outside the registry since the last publish. Writes nothing. Global ontologies only.



## OpenAPI

````yaml get /api/registry/ontologies/{artifact_id}/versions/{version_id}/plan
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/registry/ontologies/{artifact_id}/versions/{version_id}/plan:
    get:
      tags:
        - Ontologies
      summary: Preview publishing to the catalog
      description: >-
        A dry run against the data catalog: every write publishing this version
        would make, what stays in the registry, and catalog edits made outside
        the registry since the last publish. Writes nothing. Global ontologies
        only.
      operationId: >-
        publish_plan_api_registry_ontologies__artifact_id__versions__version_id__plan_get
      parameters:
        - name: artifact_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The ontology's artifact ID.
            title: Artifact Id
          description: The ontology's artifact ID.
        - name: version_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The version's ID.
            title: Version Id
          description: The version's ID.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishPlan'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    PublishPlan:
      properties:
        artifact_id:
          type: string
          format: uuid
          title: Artifact Id
        version:
          type: string
          title: Version
        catalog:
          type: string
          title: Catalog
          description: Which catalog the plan is for, e.g. 'datahub'.
        operations:
          items:
            $ref: '#/components/schemas/PlanOperation'
          type: array
          title: Operations
        unchanged:
          type: integer
          title: Unchanged
          description: Entities already as the version says.
        counts:
          additionalProperties:
            type: integer
          type: object
          title: Counts
        kept_in_registry:
          items:
            $ref: '#/components/schemas/KeptInRegistry'
          type: array
          title: Kept In Registry
        drift:
          items:
            $ref: '#/components/schemas/DriftItem'
          type: array
          title: Drift
        previous_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Version
        warnings:
          items:
            type: string
          type: array
          title: Warnings
        planned_at:
          type: string
          format: date-time
          title: Planned At
      type: object
      required:
        - artifact_id
        - version
        - catalog
        - operations
        - unchanged
        - counts
        - kept_in_registry
        - drift
        - planned_at
      title: PublishPlan
      description: 'A dry run: what publishing this version would write to the catalog.'
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    PlanOperation:
      properties:
        action:
          type: string
          enum:
            - create_group
            - update_group
            - create_term
            - update_term
            - set_relations
            - set_domain
            - attach
            - detach
          title: Action
        urn:
          type: string
          title: Urn
        name:
          type: string
          title: Name
        detail:
          type: string
          title: Detail
          default: ''
        concept:
          anyOf:
            - type: string
            - type: 'null'
          title: Concept
        table:
          anyOf:
            - type: string
            - type: 'null'
          title: Table
        column:
          anyOf:
            - type: string
            - type: 'null'
          title: Column
        payload:
          additionalProperties: true
          type: object
          title: Payload
      type: object
      required:
        - action
        - urn
        - name
      title: PlanOperation
      description: One write the catalog would receive.
    KeptInRegistry:
      properties:
        source:
          type: string
          title: Source
        label:
          type: string
          title: Label
        target:
          type: string
          title: Target
      type: object
      required:
        - source
        - label
        - target
      title: KeptInRegistry
      description: A relation the catalog has no slot for.
    DriftItem:
      properties:
        urn:
          type: string
          title: Urn
        name:
          type: string
          title: Name
        fields:
          items:
            type: string
          type: array
          title: Fields
      type: object
      required:
        - urn
        - name
        - fields
      title: DriftItem
      description: A catalog entity changed outside the registry since the last publish.
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.