> ## 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 an object

> The Ingest preview over the first 5 MB of an object: rows, suggested
types, cast failures and hints. Your read is checked again first.



## OpenAPI

````yaml post /api/storage/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/storage/preview:
    post:
      tags:
        - Object storage
      summary: Preview an object
      description: |-
        The Ingest preview over the first 5 MB of an object: rows, suggested
        types, cast failures and hints. Your read is checked again first.
      operationId: preview_api_storage_preview_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoragePreviewRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewResponse'
        '403':
          description: 'The general PSK or a schedule: browse as a person.'
        '404':
          description: Not found, or not yours to read (they look the same).
        '413':
          description: Too large to preview.
        '422':
          description: Not a valid bucket, path or format.
        '502':
          description: Storage couldn't be read.
        '503':
          description: 'Ranger''s evaluator is unavailable: nothing is shown.'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    StoragePreviewRequest:
      properties:
        bucket:
          type: string
          maxLength: 63
          minLength: 3
          title: Bucket
        key:
          type: string
          maxLength: 1024
          minLength: 1
          title: Key
        format:
          anyOf:
            - $ref: '#/components/schemas/FileFormat'
            - type: 'null'
          description: Defaults to the key's extension.
        options:
          additionalProperties:
            type: string
          type: object
          title: Options
      type: object
      required:
        - bucket
        - key
      title: StoragePreviewRequest
    PreviewResponse:
      properties:
        columns:
          items:
            $ref: '#/components/schemas/PreviewColumn'
          type: array
          title: Columns
        rows:
          items:
            items: {}
            type: array
          type: array
          title: Rows
        row_count_estimate:
          anyOf:
            - type: integer
            - type: 'null'
          title: Row Count Estimate
        warnings:
          items:
            type: string
          type: array
          title: Warnings
      type: object
      required:
        - columns
        - rows
      title: PreviewResponse
    FileFormat:
      type: string
      enum:
        - csv
        - json
        - parquet
        - orc
        - xml
        - xlsx
      title: FileFormat
    PreviewColumn:
      properties:
        name:
          type: string
          title: Name
        detected:
          type: string
          title: Detected
        suggested:
          type: string
          title: Suggested
        nullable:
          type: boolean
          title: Nullable
        samples:
          items:
            type: string
          type: array
          title: Samples
        cast_failures:
          type: integer
          title: Cast Failures
          default: 0
        pii:
          anyOf:
            - type: string
            - type: 'null'
          title: Pii
        key_candidate:
          type: boolean
          title: Key Candidate
          default: false
        cursor_candidate:
          type: boolean
          title: Cursor Candidate
          default: false
      type: object
      required:
        - name
        - detected
        - suggested
        - nullable
      title: PreviewColumn
  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.