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

# Compare two versions

> Field-level differences between any two versions of an artifact.



## OpenAPI

````yaml get /api/registry/artifacts/{artifact_id}/diff
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/artifacts/{artifact_id}/diff:
    get:
      tags:
        - Registry
      summary: Compare two versions
      description: Field-level differences between any two versions of an artifact.
      operationId: diff_versions_api_registry_artifacts__artifact_id__diff_get
      parameters:
        - name: artifact_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The artifact's ID.
            title: Artifact Id
          description: The artifact's ID.
        - name: from
          in: query
          required: true
          schema:
            type: string
            description: The older version.
            title: From
          description: The older version.
        - name: to
          in: query
          required: true
          schema:
            type: string
            description: The newer version.
            title: To
          description: The newer version.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api__models__registry_models__DiffResponse
        '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
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    api__models__registry_models__DiffResponse:
      properties:
        from_version:
          type: string
          title: From Version
        to_version:
          type: string
          title: To Version
        entries:
          items:
            $ref: '#/components/schemas/DiffEntry'
          type: array
          title: Entries
      type: object
      required:
        - from_version
        - to_version
        - entries
      title: DiffResponse
      description: Field-level difference between two specs.
    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
    DiffEntry:
      properties:
        path:
          type: string
          title: Path
        op:
          type: string
          enum:
            - added
            - removed
            - changed
          title: Op
        before:
          title: Before
        after:
          title: After
      type: object
      required:
        - path
        - op
      title: DiffEntry
      description: One field that differs between two versions.
  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.