> ## 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.

# Publish to the catalog

> Write an approved Global version into the data catalog, adding and updating, never rebuilding. Registry admins only. Catalog edits made outside the registry refuse it (409) unless `accept_drift` is set.



## OpenAPI

````yaml post /api/registry/ontologies/{artifact_id}/versions/{version_id}/publish
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}/publish:
    post:
      tags:
        - Ontologies
      summary: Publish to the catalog
      description: >-
        Write an approved Global version into the data catalog, adding and
        updating, never rebuilding. Registry admins only. Catalog edits made
        outside the registry refuse it (409) unless `accept_drift` is set.
      operationId: >-
        publish_api_registry_ontologies__artifact_id__versions__version_id__publish_post
      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.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/api__models__ontology_models__PublishRequest
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api__models__ontology_models__PublicationResponse
        '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:
    api__models__ontology_models__PublishRequest:
      properties:
        accept_drift:
          type: boolean
          title: Accept Drift
          description: >-
            Overwrite catalog edits made since the last publish. Without it,
            drift refuses the publish (409).
          default: false
      type: object
      title: PublishRequest
      description: Publish an approved Global version to the catalog.
    api__models__ontology_models__PublicationResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        artifact_id:
          type: string
          format: uuid
          title: Artifact Id
        version_id:
          type: string
          format: uuid
          title: Version Id
        version:
          type: string
          title: Version
        catalog:
          type: string
          title: Catalog
        status:
          type: string
          enum:
            - published
            - partial
            - failed
          title: Status
        published_by:
          type: string
          title: Published By
        published_at:
          type: string
          format: date-time
          title: Published At
        counts:
          additionalProperties:
            type: integer
          type: object
          title: Counts
        errors:
          items:
            type: string
          type: array
          title: Errors
      type: object
      required:
        - id
        - artifact_id
        - version_id
        - version
        - catalog
        - status
        - published_by
        - published_at
        - counts
      title: PublicationResponse
      description: One publish of a version 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
  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.