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

# List Query Results

> List all query runs with pagination and filtering options. List items omit the columns and rows payloads — fetch an individual run via GET /query/{id} for the full result.



## OpenAPI

````yaml GET /query
openapi: 3.0.0
info:
  title: Cloudglue API
  description: API for Cloudglue
  license:
    name: Apache License 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 0.7.15
servers:
  - url: https://api.cloudglue.dev/v1
security:
  - bearerAuth: []
paths:
  /query:
    get:
      tags:
        - Query
      summary: List query results
      description: >-
        List all query runs with pagination and filtering options. List items
        omit the columns and rows payloads — fetch an individual run via GET
        /query/{id} for the full result.
      operationId: listQueries
      parameters:
        - name: limit
          in: query
          description: Maximum number of query results to return
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
        - name: offset
          in: query
          description: Number of query results to skip
          required: false
          schema:
            type: integer
            minimum: 0
        - name: status
          in: query
          description: Filter by query status
          required: false
          schema:
            type: string
            enum:
              - completed
              - failed
              - in_progress
              - cancelled
        - name: created_before
          in: query
          description: >-
            Filter query results created before a specific date (YYYY-MM-DD
            format), in UTC timezone
          required: false
          schema:
            type: string
            format: date
        - name: created_after
          in: query
          description: >-
            Filter query results created after a specific date (YYYY-MM-DD
            format), in UTC timezone
          required: false
          schema:
            type: string
            format: date
      responses:
        '200':
          description: List of query results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryListResponse'
        '500':
          description: An unexpected error occurred on the server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    QueryListResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
          description: Object type identifier
        data:
          type: array
          items:
            $ref: '#/components/schemas/QueryListItem'
          description: Array of query result items (without columns or rows)
        total:
          type: integer
          description: Total number of query results
        limit:
          type: integer
          description: Maximum number of items returned
        offset:
          type: integer
          description: Number of items skipped
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    QueryListItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Query result ID
        object:
          type: string
          enum:
            - query_result
          description: Object type identifier
        status:
          type: string
          enum:
            - completed
            - failed
            - in_progress
            - cancelled
          description: Current status
        created_at:
          type: number
          description: Unix timestamp of creation
        collections:
          type: array
          items:
            type: string
            format: uuid
          description: Collection IDs the query ran over
        sql:
          type: string
          nullable: true
          description: The effective SQL that was executed
        row_count:
          type: integer
          description: Number of rows returned
        truncated:
          type: boolean
          description: Whether the result was truncated
        usage:
          $ref: '#/components/schemas/QueryUsage'
          nullable: true
          description: Dataset and timing usage for the run
        error:
          type: object
          nullable: true
          properties:
            code:
              type: string
            message:
              type: string
          description: Error details if the query failed
    QueryUsage:
      type: object
      properties:
        files_scanned:
          type: integer
          description: Number of files loaded into the files virtual table
        entity_rows:
          type: integer
          description: Number of rows loaded into the entities virtual table
        segment_entity_rows:
          type: integer
          description: Number of rows loaded into the segment_entities virtual table
        engine_ms:
          type: number
          description: SQL execution time in milliseconds
        total_ms:
          type: number
          description: Total processing time in milliseconds, including dataset preparation
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````