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

# Query project data

> Executes a validated, read-only SQL query scoped to the authenticated project.



## OpenAPI

````yaml /openapi/openapi.yaml post /v1/sql/query
openapi: 3.1.0
info:
  title: Laminar API
  version: 1.0.0
  description: Public HTTP API for ingesting and managing data in a Laminar project.
  license:
    name: Apache 2.0
    identifier: Apache-2.0
servers:
  - url: https://api.lmnr.ai
    description: Laminar Cloud
security:
  - projectApiKey: []
tags:
  - name: Ingestion
    description: Send telemetry data to Laminar.
  - name: Traces
    description: Update trace data after ingestion.
  - name: SQL
    description: Query project data with read-only SQL.
  - name: Projects
    description: Resolve project information.
  - name: Datasets
    description: Read datasets and add datapoints.
  - name: Evaluations
    description: Create evaluation runs and record their results.
  - name: Labeling queues
    description: Add items to labeling queues.
  - name: Signals
    description: Manage automated evaluations of project traces.
  - name: LLM profiles
    description: Configure workspace LLM credentials and models for self-hosted Signals.
paths:
  /v1/sql/query:
    post:
      tags:
        - SQL
      summary: Query project data
      description: >-
        Executes a validated, read-only SQL query scoped to the authenticated
        project.
      operationId: executeSqlQuery
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SqlQueryRequest'
      responses:
        '200':
          description: Query results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SqlQueryResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          description: SQL query rate limit exceeded.
components:
  schemas:
    SqlQueryRequest:
      type: object
      required:
        - query
      properties:
        query:
          type: string
        parameters:
          type: object
          additionalProperties: true
          default: {}
    SqlQueryResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/JsonValue'
    JsonValue: {}
    Error:
      oneOf:
        - type: object
          properties:
            error:
              type: string
          required:
            - error
        - type: string
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
  securitySchemes:
    projectApiKey:
      type: http
      scheme: bearer
      bearerFormat: Project API key
      description: A Laminar project API key.

````