> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Dataset Versions



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json post /v2/datasets/{dataset_id}/versions/query
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/datasets/{dataset_id}/versions/query:
    post:
      tags:
        - datasets
      summary: Query Dataset Versions
      operationId: query_dataset_versions_v2_datasets__dataset_id__versions_query_post
      parameters:
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Dataset Id
        - name: starting_token
          in: query
          required: false
          schema:
            type: integer
            title: Starting Token
            default: 0
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            title: Limit
            default: 100
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListDatasetVersionParams'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDatasetVersionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - OAuth2PasswordBearer: []
        - HTTPBasic: []
components:
  schemas:
    ListDatasetVersionParams:
      properties:
        sort:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/DatasetVersionIndexSort'
              discriminator:
                propertyName: name
                mapping:
                  version_index:
                    $ref: '#/components/schemas/DatasetVersionIndexSort'
            - type: 'null'
          title: Sort
      type: object
      title: ListDatasetVersionParams
    ListDatasetVersionResponse:
      properties:
        starting_token:
          type: integer
          title: Starting Token
          default: 0
        limit:
          type: integer
          title: Limit
          default: 100
        paginated:
          type: boolean
          title: Paginated
          default: false
        next_starting_token:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Starting Token
        versions:
          items:
            $ref: '#/components/schemas/DatasetVersionDB'
          type: array
          title: Versions
      type: object
      required:
        - versions
      title: ListDatasetVersionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DatasetVersionIndexSort:
      properties:
        name:
          type: string
          const: version_index
          title: Name
          default: version_index
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: DatasetVersionIndexSort
    DatasetVersionDB:
      properties:
        version_index:
          type: integer
          title: Version Index
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by_user:
          anyOf:
            - $ref: '#/components/schemas/UserInfo'
            - type: 'null'
        num_rows:
          type: integer
          title: Num Rows
        column_names:
          items:
            type: string
          type: array
          title: Column Names
        rows_added:
          type: integer
          title: Rows Added
        rows_removed:
          type: integer
          title: Rows Removed
        rows_edited:
          type: integer
          title: Rows Edited
        columns_added:
          type: integer
          title: Columns Added
        columns_removed:
          type: integer
          title: Columns Removed
        columns_renamed:
          type: integer
          title: Columns Renamed
      type: object
      required:
        - version_index
        - name
        - created_at
        - created_by_user
        - num_rows
        - column_names
        - rows_added
        - rows_removed
        - rows_edited
        - columns_added
        - columns_removed
        - columns_renamed
      title: DatasetVersionDB
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UserInfo:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        email:
          type: string
          title: Email
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
      type: object
      required:
        - id
        - email
      title: UserInfo
      description: A user's basic information, used for display purposes.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login
    HTTPBasic:
      type: http
      scheme: basic

````