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

# Get query schema

> Get the schema for TRQL queries, including all available tables, their columns, data types, descriptions, and allowed values.



## OpenAPI

````yaml v3-openapi GET /api/v1/query/schema
openapi: 3.1.0
info:
  title: Trigger.dev v3 REST API
  description: >-
    The REST API lets you trigger and manage runs on Trigger.dev. You can
    trigger a run, get the status of a run, and get the results of a run. 
  version: 2024-04
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.trigger.dev
    description: Trigger.dev API
security: []
paths:
  /api/v1/query/schema:
    get:
      tags:
        - query
      summary: Get query schema
      description: >-
        Get the schema for TRQL queries, including all available tables, their
        columns, data types, descriptions, and allowed values.
      operationId: get_query_schema_v1
      responses:
        '200':
          description: Schema retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  tables:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Table name used in TRQL queries
                        description:
                          type: string
                          description: Description of the table
                        timeColumn:
                          type: string
                          description: The primary time column for this table
                        columns:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                description: Column name
                              type:
                                type: string
                                description: ClickHouse data type
                              description:
                                type: string
                                description: Column description
                              example:
                                type: string
                                description: Example value
                              allowedValues:
                                type: array
                                items:
                                  type: string
                                description: Allowed values for enum-like columns
                              coreColumn:
                                type: boolean
                                description: >-
                                  Whether this is a core column included in
                                  default queries
        '401':
          description: Unauthorized - API key is missing or invalid
      security:
        - secretKey: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl "https://api.trigger.dev/api/v1/query/schema" \
              -H "Authorization: Bearer tr_dev_1234"
components:
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >
        Use your project-specific Secret API key. Will start with `tr_dev_`,
        `tr_prod`, `tr_stg`, etc.


        You can find your Secret API key in the API Keys section of your
        Trigger.dev project dashboard.


        Our TypeScript SDK will default to using the value of the
        `TRIGGER_SECRET_KEY` environment variable if it is set. If you are using
        the SDK in a different environment, you can set the key using the
        `configure` function.


        ```typescript

        import { configure } from "@trigger.dev/sdk";


        configure({ accessToken: "tr_dev_1234" });

        ```

````