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

# Test an item as me

> Resolve one item — saved, or an unsaved one in `item` — with your own
access, as an agent you ran would. Nothing is cached or stored. A
draft can be previewed by whoever can change it.



## OpenAPI

````yaml post /api/registry/context/versions/{version_id}/preview
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/context/versions/{version_id}/preview:
    post:
      tags:
        - Context packs
      summary: Test an item as me
      description: |-
        Resolve one item — saved, or an unsaved one in `item` — with your own
        access, as an agent you ran would. Nothing is cached or stored. A
        draft can be previewed by whoever can change it.
      operationId: preview_item_api_registry_context_versions__version_id__preview_post
      parameters:
        - name: version_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The pack version's ID.
            title: Version Id
          description: The pack version's ID.
        - name: item_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 64
              - type: 'null'
            description: A saved item.
            title: Item Id
          description: A saved item.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ItemPreviewRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemPreviewResponse'
        '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:
    ItemPreviewRequest:
      properties:
        params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Params
          description: A lookup's parameter values.
        item:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Item
          description: An unsaved item to preview instead (validated like a saved one).
      type: object
      title: ItemPreviewRequest
      description: Resolve one item of a version as yourself ("Test as me").
    ItemPreviewResponse:
      properties:
        status:
          type: string
          title: Status
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        content:
          type: string
          title: Content
          default: ''
        tokens:
          type: integer
          title: Tokens
          default: 0
        rows:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rows
        truncated:
          type: boolean
          title: Truncated
          default: false
        elapsed_ms:
          type: integer
          title: Elapsed Ms
          default: 0
        source:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Source
      type: object
      required:
        - status
      title: ItemPreviewResponse
      description: What the item resolves to for you. Never stored.
    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.