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

# Retire a published version



## OpenAPI

````yaml post /api/data-apis/{name}/versions/{version}/retire
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/data-apis/{name}/versions/{version}/retire:
    post:
      tags:
        - Data APIs
      summary: Retire a published version
      operationId: >-
        retire_data_api_version_api_data_apis__name__versions__version__retire_post
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-z][a-z0-9_]{1,62}$
            description: The API's name.
            title: Name
          description: The API's name.
        - name: version
          in: path
          required: true
          schema:
            type: string
            pattern: ^(\d{1,6}|draft)$
            description: A version number, or 'draft'.
            title: Version
          description: A version number, or 'draft'.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataApiVersionSummary'
        '400':
          description: Invalid request.
        '403':
          description: Not allowed.
        '404':
          description: No such API or version.
        '409':
          description: Conflicts with the API's state.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many of your queries are running; see Retry-After.
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    DataApiVersionSummary:
      properties:
        version:
          type: integer
          title: Version
        status:
          $ref: '#/components/schemas/api__models__data_api_models__VersionStatus'
        context_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Context Hash
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        published_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Published By
        published_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Published At
        retired_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Retired At
      type: object
      required:
        - version
        - status
        - created_at
      title: DataApiVersionSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    api__models__data_api_models__VersionStatus:
      type: string
      enum:
        - draft
        - published
        - retired
      title: VersionStatus
      description: A version's lifecycle. Only ``draft`` can be edited.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  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.