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

# Read a published Data API

> Rows as you may see them, and the context they come with.

Filters are query parameters from the version's contract: ``col=value``,
``col.gte=value``, ``col.in=a,b``, ``col.is_null=true``. Also ``sort``
(``-a,b``), ``limit``, ``columns`` and ``cursor``. Runs as you, so
Ranger's masks and row filters apply.



## OpenAPI

````yaml get /api/data/{name}/{version}
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/{name}/{version}:
    get:
      tags:
        - Data consumer
      summary: Read a published Data API
      description: |-
        Rows as you may see them, and the context they come with.

        Filters are query parameters from the version's contract: ``col=value``,
        ``col.gte=value``, ``col.in=a,b``, ``col.is_null=true``. Also ``sort``
        (``-a,b``), ``limit``, ``columns`` and ``cursor``. Runs as you, so
        Ranger's masks and row filters apply.
      operationId: query_data_api_api_data__name___version__get
      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: ^(v\d{1,6}|draft)$
            description: '''v<number>'', or ''draft'' (owner only).'
            title: Version
          description: '''v<number>'', or ''draft'' (owner only).'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataApiQueryResponse'
        '400':
          description: Invalid request.
        '403':
          description: Not allowed.
        '404':
          description: No such API or version.
        '409':
          description: Conflicts with the API's state.
        '410':
          description: Retired.
        '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:
    DataApiQueryResponse:
      properties:
        columns:
          items:
            type: string
          type: array
          title: Columns
        data:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Data
        row_count:
          type: integer
          title: Row Count
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        masked_columns:
          items:
            type: string
          type: array
          title: Masked Columns
        context:
          $ref: '#/components/schemas/ContextStub'
      type: object
      required:
        - columns
        - data
        - row_count
        - context
      title: DataApiQueryResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ContextStub:
      properties:
        api:
          type: string
          title: Api
        version:
          type: integer
          title: Version
        context_hash:
          type: string
          title: Context Hash
        as_of:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: As Of
          description: When the source was last written (DataHub).
        dq:
          anyOf:
            - $ref: '#/components/schemas/DataQualitySummary'
            - type: 'null'
        warnings:
          items:
            type: string
          type: array
          title: Warnings
        href:
          type: string
          title: Href
      type: object
      required:
        - api
        - version
        - context_hash
        - href
      title: ContextStub
      description: The small piece of context every data response carries.
    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
    DataQualitySummary:
      properties:
        status:
          type: string
          enum:
            - pass
            - warn
            - fail
            - unknown
          title: Status
        table:
          anyOf:
            - type: string
            - type: 'null'
          title: Table
        checked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Checked At
        passed:
          type: integer
          title: Passed
          default: 0
        total:
          type: integer
          title: Total
          default: 0
        failing:
          items:
            type: string
          type: array
          title: Failing
      type: object
      required:
        - status
      title: DataQualitySummary
  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.