Lightdash Exploring API

The Exploring API from Lightdash — 3 operation(s) for exploring.

Operations 3

POST /api/v1/projects/{projectUuid}/explores/{exploreId}/runUnderlyingDataQuery Run underlying data query #
POST /api/v1/projects/{projectUuid}/explores/{exploreId}/runQuery Run metric query #
POST /api/v1/projects/{projectUuid}/sqlQuery Run SQL query #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lightdash-exploring-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lightdash-exploring-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lightdash AiAgents Exploring API
  version: 0.3156.1
  description: 'Open API documentation for all public Lightdash API endpoints. # Authentication Before you get started, you might need to create a Personal Access Token to authenticate via the API. You can create a token by following this guide: https://docs.lightdash.com/references/personal_tokens

    '
  license:
    name: MIT
  contact:
    name: Lightdash Support
    email: support@lightdash.com
    url: https://docs.lightdash.com/help-and-contact/contact/contact_info/
servers:
- url: /
tags:
- name: Exploring
paths:
  /api/v1/projects/{projectUuid}/explores/{exploreId}/runUnderlyingDataQuery:
    post:
      operationId: postRunUnderlyingDataQuery
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiRunQueryResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: 'Deprecated — use the v2 Execute underlying data endpoint instead.


        This endpoint was deprecated on 20 March 2025 and is past its sunset date (30 April 2025) — it may be removed at any time. Migrate to the v2 async query flow: Execute underlying data, then Get results.'
      summary: Run underlying data query
      tags:
      - Exploring
      deprecated: true
      security: []
      parameters:
      - description: The uuid of the project
        in: path
        name: projectUuid
        required: true
        schema:
          type: string
      - description: table name
        in: path
        name: exploreId
        required: true
        schema:
          type: string
      requestBody:
        description: metricQuery for the chart to run
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricQueryRequest'
              description: metricQuery for the chart to run
      x-mint:
        content: '<Warning>

          **This endpoint is deprecated and past its sunset date (30 April 2025) — it may be removed at any time.**


          Migrate to the v2 async query flow: [Execute underlying data](https://docs.lightdash.com/api-reference/v2/execute-underlying-data) (`POST /api/v2/projects/{projectUuid}/query/underlying-data`) to start the query, then [Get results](https://docs.lightdash.com/api-reference/v2/get-results) to fetch rows. See also [Cancel query](https://docs.lightdash.com/api-reference/v2/cancel-query) and [Download results](https://docs.lightdash.com/api-reference/v2/download-results).

          </Warning>'
  /api/v1/projects/{projectUuid}/explores/{exploreId}/runQuery:
    post:
      operationId: RunMetricQuery
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiRunQueryResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: 'Deprecated — use the v2 Execute metric query endpoint instead.


        This endpoint was deprecated on 20 March 2025 and is past its sunset date (30 April 2025) — it may be removed at any time. Migrate to the v2 async query flow: Execute metric query, then Get results.'
      summary: Run metric query
      tags:
      - Exploring
      deprecated: true
      security: []
      parameters:
      - description: The uuid of the project
        in: path
        name: projectUuid
        required: true
        schema:
          type: string
      - description: table name
        in: path
        name: exploreId
        required: true
        schema:
          type: string
      requestBody:
        description: metricQuery for the chart to run
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricQueryRequest'
              description: metricQuery for the chart to run
      x-mint:
        content: '<Warning>

          **This endpoint is deprecated and past its sunset date (30 April 2025) — it may be removed at any time.**


          Migrate to the v2 async query flow: [Execute metric query](https://docs.lightdash.com/api-reference/v2/execute-metric-query) (`POST /api/v2/projects/{projectUuid}/query/metric-query`) to start the query, then [Get results](https://docs.lightdash.com/api-reference/v2/get-results) to fetch rows. See also [Cancel query](https://docs.lightdash.com/api-reference/v2/cancel-query) and [Download results](https://docs.lightdash.com/api-reference/v2/download-results).

          </Warning>'
  /api/v1/projects/{projectUuid}/sqlQuery:
    post:
      operationId: RunSqlQuery
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                properties:
                  results:
                    $ref: '#/components/schemas/ApiSqlQueryResults'
                  status:
                    type: string
                    enum:
                    - ok
                required:
                - results
                - status
                type: object
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      description: 'Deprecated — use the v2 Execute SQL query endpoint instead.


        This endpoint was deprecated on 17 February 2025 and is past its sunset date (17 May 2025) — it may be removed at any time. Migrate to the v2 async query flow: Execute SQL query, then Get results.'
      summary: Run SQL query
      tags:
      - Exploring
      deprecated: true
      security: []
      parameters:
      - description: The uuid of the project to run the query against
        in: path
        name: projectUuid
        required: true
        schema:
          type: string
      requestBody:
        description: The query to run
        required: true
        content:
          application/json:
            schema:
              properties:
                sql:
                  type: string
              required:
              - sql
              type: object
              description: The query to run
      x-mint:
        content: '<Warning>

          **This endpoint is deprecated and past its sunset date (17 May 2025) — it may be removed at any time.**


          Migrate to the v2 async query flow: [Execute SQL query](https://docs.lightdash.com/api-reference/v2/execute-sql-query) (`POST /api/v2/projects/{projectUuid}/query/sql`) to start the query, then [Get results](https://docs.lightdash.com/api-reference/v2/get-results) to fetch rows. See also [Cancel query](https://docs.lightdash.com/api-reference/v2/cancel-query) and [Download results](https://docs.lightdash.com/api-reference/v2/download-results).

          </Warning>'
components:
  schemas:
    Record_string.unknown_:
      properties: {}
      additionalProperties: {}
      type: object
      description: Construct a type with a set of properties K of type T
    PreAggregateMissReason.GRANULARITY_TOO_FINE:
      enum:
      - granularity_too_fine
      type: string
    SortField:
      properties:
        pivotValues:
          items:
            $ref: '#/components/schemas/PivotSortAnchor'
          type: array
          description: Pins the row-sort anchor to a specific pivot column. Ignored for non-pivoted results.
        nullsFirst:
          type: boolean
          description: Sort null values first
        descending:
          type: boolean
          description: Sort in descending order
        fieldId:
          type: string
          description: Field ID to sort by
      required:
      - descending
      - fieldId
      type: object
    PreAggregateMissReason.FILTER_DIMENSION_NOT_IN_PRE_AGGREGATE:
      enum:
      - filter_dimension_not_in_pre_aggregate
      type: string
    BinType.CUSTOM_GROUP:
      enum:
      - custom_group
      type: string
    TableCalculationTemplateType.RANK_IN_COLUMN:
      enum:
      - rank_in_column
      type: string
    MetricOverrides:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/Pick_Metric.formatOptions_'
      type: object
    ApiRunQueryResponse:
      properties:
        results:
          properties:
            fields:
              $ref: '#/components/schemas/Record_string.Item-or-AdditionalMetric_'
            rows:
              items:
                $ref: '#/components/schemas/AnyType'
              type: array
            cacheMetadata:
              $ref: '#/components/schemas/CacheMetadata'
            metricQuery:
              $ref: '#/components/schemas/MetricQueryResponse'
          required:
          - rows
          - cacheMetadata
          - metricQuery
          type: object
        status:
          type: string
          enum:
          - ok
      required:
      - results
      - status
      type: object
    PreAggregateMissReason.NO_PRE_AGGREGATES_DEFINED:
      enum:
      - no_pre_aggregates_defined
      type: string
    CustomSqlDimension:
      properties:
        id:
          type: string
          description: Unique identifier for the custom dimension
        name:
          type: string
          description: Display name for the custom dimension
        table:
          type: string
          description: Table this custom dimension belongs to
        type:
          $ref: '#/components/schemas/CustomDimensionType.SQL'
          description: Type of custom dimension (bin or sql)
        sql:
          type: string
          description: SQL expression for the custom dimension
        dimensionType:
          $ref: '#/components/schemas/DimensionType'
          description: Data type of the dimension result
      required:
      - id
      - name
      - table
      - type
      - sql
      - dimensionType
      type: object
      additionalProperties: true
    TableCalculationTemplateType.PERCENT_CHANGE_FROM_PREVIOUS:
      enum:
      - percent_change_from_previous
      type: string
    TableCalculation:
      anyOf:
      - $ref: '#/components/schemas/SqlTableCalculation'
      - $ref: '#/components/schemas/TemplateTableCalculation'
      - $ref: '#/components/schemas/FormulaTableCalculation'
    GroupValueRule:
      properties:
        value:
          type: string
        matchType:
          $ref: '#/components/schemas/GroupValueMatchType'
      required:
      - value
      - matchType
      type: object
    PreAggregateMatchMiss:
      anyOf:
      - properties:
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.NO_PRE_AGGREGATES_DEFINED'
        required:
        - reason
        type: object
      - properties:
          fieldId:
            $ref: '#/components/schemas/FieldId'
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.DIMENSION_NOT_IN_PRE_AGGREGATE'
        required:
        - fieldId
        - reason
        type: object
      - properties:
          fieldId:
            $ref: '#/components/schemas/FieldId'
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.METRIC_NOT_IN_PRE_AGGREGATE'
        required:
        - fieldId
        - reason
        type: object
      - properties:
          fieldId:
            $ref: '#/components/schemas/FieldId'
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.NON_ADDITIVE_METRIC'
        required:
        - fieldId
        - reason
        type: object
      - properties:
          fieldId:
            $ref: '#/components/schemas/FieldId'
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.CUSTOM_SQL_METRIC'
        required:
        - fieldId
        - reason
        type: object
      - properties:
          fieldId:
            $ref: '#/components/schemas/FieldId'
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.FILTER_DIMENSION_NOT_IN_PRE_AGGREGATE'
        required:
        - fieldId
        - reason
        type: object
      - properties:
          fieldId:
            $ref: '#/components/schemas/FieldId'
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.PRE_AGGREGATE_FILTER_NOT_SATISFIED'
        required:
        - fieldId
        - reason
        type: object
      - properties:
          preAggregateTimeDimension:
            type: string
          preAggregateGranularity:
            $ref: '#/components/schemas/TimeFrames'
          queryGranularity:
            $ref: '#/components/schemas/TimeFrames'
          fieldId:
            $ref: '#/components/schemas/FieldId'
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.GRANULARITY_TOO_FINE'
        required:
        - preAggregateTimeDimension
        - preAggregateGranularity
        - queryGranularity
        - fieldId
        - reason
        type: object
      - properties:
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.CUSTOM_DIMENSION_PRESENT'
        required:
        - reason
        type: object
      - properties:
          fieldId:
            $ref: '#/components/schemas/FieldId'
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.CUSTOM_METRIC_PRESENT'
        required:
        - fieldId
        - reason
        type: object
      - properties:
          fieldId:
            $ref: '#/components/schemas/FieldId'
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.TABLE_CALCULATION_PRESENT'
        required:
        - fieldId
        - reason
        type: object
      - properties:
          preAggregateName:
            type: string
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.USER_BYPASS'
        required:
        - preAggregateName
        - reason
        type: object
      - properties:
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.EXPLORE_RESOLUTION_ERROR'
        required:
        - reason
        type: object
      - properties:
          reason:
            $ref: '#/components/schemas/PreAggregateMissReason.NO_ACTIVE_MATERIALIZATION'
        required:
        - reason
        type: object
    PreAggregateMissReason.CUSTOM_DIMENSION_PRESENT:
      enum:
      - custom_dimension_present
      type: string
    PreAggregateMissReason.DIMENSION_NOT_IN_PRE_AGGREGATE:
      enum:
      - dimension_not_in_pre_aggregate
      type: string
    FiltersResponse:
      properties:
        tableCalculations:
          $ref: '#/components/schemas/FilterGroupResponse'
        metrics:
          $ref: '#/components/schemas/FilterGroupResponse'
        dimensions:
          $ref: '#/components/schemas/FilterGroupResponse'
      type: object
    Record_string._type-DimensionType__:
      properties: {}
      additionalProperties:
        properties:
          type:
            $ref: '#/components/schemas/DimensionType'
        required:
        - type
        type: object
      type: object
      description: Construct a type with a set of properties K of type T
    Pick_Metric.formatOptions_:
      properties:
        formatOptions:
          $ref: '#/components/schemas/CustomFormat'
      type: object
      description: From T, pick a set of properties whose keys are in the union K
    TimeFrames:
      enum:
      - RAW
      - YEAR
      - QUARTER
      - MONTH
      - WEEK
      - DAY
      - HOUR
      - MINUTE
      - SECOND
      - MILLISECOND
      - DAY_OF_WEEK_INDEX
      - DAY_OF_MONTH_NUM
      - DAY_OF_YEAR_NUM
      - WEEK_NUM
      - MONTH_NUM
      - QUARTER_NUM
      - YEAR_NUM
      - DAY_OF_WEEK_NAME
      - MONTH_NAME
      - QUARTER_NAME
      - HOUR_OF_DAY_NUM
      - MINUTE_OF_HOUR_NUM
      type: string
    TableCalculationTemplateType.PERCENT_OF_COLUMN_TOTAL:
      enum:
      - percent_of_column_total
      type: string
    CompactOrAlias:
      anyOf:
      - $ref: '#/components/schemas/Compact'
      - type: string
        enum:
        - K
        - thousand
        - M
        - million
        - B
        - billion
        - T
        - trillion
        - KB
        - kilobyte
        - MB
        - megabyte
        - GB
        - gigabyte
        - TB
        - terabyte
        - PB
        - petabyte
        - KiB
        - kibibyte
        - MiB
        - mebibyte
        - GiB
        - gibibyte
        - TiB
        - tebibyte
        - PiB
        - pebibyte
    MetricFilterRule:
      description: Filter rule for metrics, targeting fields by reference
      properties:
        values:
          items:
            $ref: '#/components/schemas/AnyType'
          type: array
          description: Values to filter by
        operator:
          $ref: '#/components/schemas/FilterOperator'
          description: Filter operator
        id:
          type: string
          description: Unique identifier for the filter
        target:
          properties:
            fieldRef:
              type: string
              description: Field reference to filter on (e.g., 'table_name.field_name')
          required:
          - fieldRef
          type: object
          description: Target field for the filter
        settings:
          $ref: '#/components/schemas/AnyType'
          description: Additional settings for date/time filters
        disabled:
          type: boolean
          description: Whether this filter is disabled
        required:
          type: boolean
          description: Whether this filter is required
        caseSensitive:
          type: boolean
          description: 'Overrides the field/explore case-sensitivity for this rule only.

            Used by internal features like autocomplete search that must always

            match case-insensitively regardless of the field''s configured setting.'
      required:
      - operator
      - id
      - target
      type: object
      additionalProperties: true
    PreAggregateMissReason.EXPLORE_RESOLUTION_ERROR:
      enum:
      - explore_resolution_error
      type: string
    Field:
      properties:
        fieldType:
          $ref: '#/components/schemas/FieldType'
        type:
          type: string
        name:
          type: string
        label:
          type: string
        table:
          type: string
        tableLabel:
          type: string
        sql:
          type: string
        description:
          type: string
        source:
          $ref: '#/components/schemas/Source'
        hidden:
          type: boolean
        compact:
          $ref: '#/components/schemas/CompactOrAlias'
        round:
          type: number
          format: double
        format:
          anyOf:
          - $ref: '#/components/schemas/Format'
          - type: string
        separator:
          $ref: '#/components/schemas/NumberSeparator'
          description: 'Number separator style for grouping/decimal characters. Composes with

            `format` (including ECMA-376 expressions) and `formatOptions` — it only

            controls the separator characters, not the format shape.'
        groupLabel:
          type: string
          deprecated: true
        groups:
          items:
            type: string
          type: array
        urls:
          items:
            $ref: '#/components/schemas/FieldUrl'
          type: array
        index:
          type: number
          format: double
        tags:
          items:
            type: string
          type: array
        parameterReferences:
          items:
            type: string
          type: array
      required:
      - fieldType
      - type
      - name
      - label
      - table
      - tableLabel
      - sql
      - hidden
      type: object
      additionalProperties: true
    TableCalculationTemplateType.PERCENT_OF_PREVIOUS_VALUE:
      enum:
      - percent_of_previous_value
      type: string
    CustomBinDimension:
      anyOf:
      - $ref: '#/components/schemas/FixedNumberBinDimension'
      - $ref: '#/components/schemas/FixedWidthBinDimension'
      - $ref: '#/components/schemas/CustomRangeBinDimension'
      - $ref: '#/components/schemas/CustomGroupBinDimension'
    CustomFormat:
      properties:
        type:
          $ref: '#/components/schemas/CustomFormatType'
          description: Format type
        round:
          type: number
          format: double
          description: Number of decimal places
        separator:
          $ref: '#/components/schemas/NumberSeparator'
          description: Number separator style
        currency:
          type: string
          description: Currency code (e.g., USD, GBP, EUR)
        compact:
          $ref: '#/components/schemas/CompactOrAlias'
          description: Compact format for large numbers (K, M, B, T) or byte units
        prefix:
          type: string
          description: Prefix to prepend to formatted values
        suffix:
          type: string
          description: Suffix to append to formatted values
        timeInterval:
          $ref: '#/components/schemas/TimeFrames'
          description: Time interval for date formatting
        custom:
          type: string
          description: Custom format string
      required:
      - type
      type: object
      additionalProperties: true
    AnyType:
      description: 'This AnyType is an alias for any

        The goal is to make it easier to identify any type in the codebase

        without having to eslint-disable all the time

        These are only used on legacy `any` types, don''t use it for new types.

        This is added on a separate file to avoid circular dependencies.'
    FrameType:
      enum:
      - rows
      - range
      type: string
    WindowFunctionType:
      enum:
      - row_number
      - percent_rank
      - cume_dist
      - rank
      - sum
      - avg
      - count
      - min
      - max
      type: string
    TableCalculationTemplateType.WINDOW_FUNCTION:
      enum:
      - window_function
      type: string
    BinType.FIXED_WIDTH:
      enum:
      - fixed_width
      type: string
    MetricType:
      enum:
      - percentile
      - average
      - count
      - count_distinct
      - sum
      - sum_distinct
      - average_distinct
      - min
      - max
      - percent_of_previous
      - percent_of_total
      - running_total
      - number
      - median
      - string
      - date
      - timestamp
      - boolean
      type: string
    TableCalculationType:
      enum:
      - number
      - string
      - date
      - timestamp
      - boolean
      type: string
    TemplateTableCalculation:
      allOf:
      - $ref: '#/components/schemas/TableCalculationBase'
      - properties:
          template:
            $ref: '#/components/schemas/TableCalculationTemplate'
            description: Template-based calculation (alternative to sql)
        required:
        - template
        type: object
    PreAggregateMissReason.NON_ADDITIVE_METRIC:
      enum:
      - non_additive_metric
      type: string
    FrameBoundary:
      properties:
        offset:
          type: number
          format: double
          description: Offset for PRECEDING/FOLLOWING
        type:
          $ref: '#/components/schemas/FrameBoundaryType'
          description: Boundary type
      required:
      - type
      type: object
    SqlTableCalculation:
      allOf:
      - $ref: '#/components/schemas/TableCalculationBase'
      - properties:
          sql:
            type: string
            description: SQL expression for the calculation (can reference fields with ${table.field})
        required:
        - sql
        type: object
    CustomRangeBinDimension:
      properties:
        id:
          type: string
          description: Unique identifier for the custom dimension
        name:
          type: string
          description: Display name for the custom dimension
        table:
          type: string
          description: Table this custom dimension belongs to
        type:
          $ref: '#/components/schemas/CustomDimensionType.BIN'
          description: Type of custom dimension (bin or sql)
        dimensionId:
          $ref: '#/components/schemas/FieldId'
          description: Field ID of the parent dimension to bin
        binType:
          $ref: '#/components/schemas/BinType.CUSTOM_RANGE'
        customRange:
          items:
            $ref: '#/components/schemas/BinRange'
          type: array
      required:
      - id
      - name
      - table
      - type
      - dimensionId
      - binType
      - customRange
      type: object
      additionalProperties: true
    CustomDimensionType.BIN:
      enum:
      - bin
      type: string
    PreAggregateMissReason.USER_BYPASS:
      enum:
      - user_bypass
      type: string
    ApiErrorPayload:
      properties:
        error:
          properties:
            data:
              $ref: '#/components/schemas/AnyType'
              description: Optional data containing details of the error
            message:
              type: string
              description: A friendly message summarising the error
            name:
              type: string
              description: Unique name for the type of error
            statusCode:
              type: number
              format: integer
              description: HTTP status code
          required:
          - name
          - statusCode
          type: object
        status:
          type: string
          enum:
          - error
      required:
      - error
      - status
      type: object
      description: 'The Error object is returned from the api any time there is an error.

        The message contains'
    FieldId:
      type: string
    DimensionOverrides:
      properties: {}
      additionalProperties:
        $ref: '#/components/schemas/Pick_Dimension.formatOptions_'
      type: object
    FixedNumberBinDimension:
      properties:
        id:
          type: string
          description: Unique identifier for the custom dimension
        name:
          type: string
          description: Display name for the custom dimension
        table:
          type: string
          description: Table this custom dimension belongs to
        type:
          $ref: '#/components/schemas/CustomDimensionType.BIN'
          description: Type of custom dimension (bin or sql)
        dimensionId:
          $ref: '#/components/schemas/FieldId'
          description: Field ID of the parent dimension to bin
        binType:
          $ref: '#/components/schemas/BinType.FIXED_NUMBER'
        binNumber:
          type: number
          format: double
      required:
      - id
      - name
      - table
      - type
      - dimensionId
      - binType
      - binNumber
      type: object
      additionalProperties: true
    FormulaTableCalculation:
      allOf:
      - $ref: '#/components/schemas/TableCalculationBase'
      - properties:
          formula:
            type: string
            description: Spreadsheet-like formula compiled to SQL at query time
        required:
        - formula
        type: object
    Source:
      properties:
        content:
          type: string
        highlight:
          properties:
            end:
              $ref: '#/components/schemas/SourcePosition'
            start:
              $ref: '#/components/schemas/SourcePosition'
          required:
          - end
          - start
          type: object
        range:
          properties:
            end:
              $ref: '#/components/schemas/SourcePosition'
            start:
              $ref: '#/components/schemas/SourcePosition'
          required:
          - end
          - start
          type: object
        path:
          type: string
      required:
      - content
      - range
      - path
      type: object
    PreAggregateMissReason.TABLE_CALCULATION_PRESENT:
      enum:
      - table_calculation_present
      type: string
    PreAggregateMissReason.CUSTOM_SQL_METRIC:
      enum:
      - custom_sql_metric
      type: string
    MetricQueryResponse:
      properties:
        metadata:
          properties:
            hasADateDimension:
              $ref: '#/components/schemas/Pick_CompiledDimension.label-or-name-or-table_'
          required:
          - hasADateDimension
          type: object
        customDimensions:
          items:
            $ref: '#/components/schemas/CustomDimension'
          type: array
        additionalMetrics:
          items:
            $ref: '#/components/schemas/AdditionalMetric'
          type: array
        tableCalculations:
          items:
            $ref: '#/components/schemas/TableCalculation'
          type: array
        limit:
          type: number
          format: double
        sorts:
          items:
            $ref: '#/components/schemas/SortField'
          type: array
        filters:
          $ref: '#/components/schemas/FiltersResponse'
        metrics:
          items:
            $ref: '#/components/schemas/FieldId'
          type: array
        dimensions:
          items:
            $ref: '#/components/schemas/FieldId'
          type: array
        exploreName:
          type: string
      required:
      - tableCalculations
      - limit
      - sorts
      - filters
      - metrics
      - dimensions
      - exploreName
      type: object
    DimensionType:
      enum:
      - string
      - number
      - timestamp
      - date
      - boolean
      type: string
    DateGranularity:
      enum:
      - Second
      - Minute
      - Hour
      - Day
      - Week
      - Month
      - Quarter
      - Year
      type: string
    SourcePosition:
      properties:
        character:
          type: number
          format: double
        line:
          type: number
          format: double
      required:
      - character
      - line
      type: object
    CustomDimension:
      anyOf:
      - $ref: '#/components/schemas/CustomBinDimension'
      - $ref: '#/components/schemas/CustomSqlDimension'
    ApiSqlQueryResults:
      properties:
        rows:
          items:
            $ref: '#/components/schemas/Record_string.unknown_'
          type: array
        fields:
          $ref: '#/components/schemas/Record_string._type-DimensionType__'
      required:
      - rows
      - fields
      type: object
    BinType.FIXED_NUMBER:
      enum:
      - fixed_number
      type: string
    Compact:
      enum:
      - thousands
      - millions
      - billions
      - trillions
      - kilobytes
      - megabytes
      - gigabytes
      - terabytes
      - petabytes
      - kibibytes
      - mebibytes
      - gibibytes
      - tebibytes
      - pebibytes
      type: string
    BinRange:
      properties:
        to:
          type: number
          format: double
          description: End value for this bin range (undefined for the last range)
        from:
          type: number
          format: double
          description: Start value for this bin range (undefined for the first range)
      type: object
    CustomDimensionType.SQL:
      enum:
      - sql
      type: string
    Record_string.Item-or-AdditionalMetric_:
      properties: {}
      additionalProperties:
        anyOf:
        - $ref: '#/components/schemas/Field'
        - $ref: '#/components/schemas/Metric'
        - $ref: '#/components/schemas/TableCalculation'
        - $ref: '#/components/schemas/AdditionalMetric'
        - $ref: '#/components/schemas/CustomDimension'
      type: object
      description: Construct a type with a set of properties K of type T
    CustomFormatType:
      enum:
      - default
      - percent
      - currency
      - number
      - id
      - date
      - timestamp
      - bytes_si
      - bytes_iec
      - custom
      type: string
    GroupValueMatchType:
      enum:
      - exact
      - startsWith
      - endsWith
      - includes
      type: string
    NumberSeparator:
      enum:
      - default
      - commaPeriod
      - spacePeriod
      - periodComma
      - noSeparatorPeriod
      - apostrophePeriod
      type: string
    MetricQueryRequest:
      properties:
        dimensionOverrides:
          $ref: '#/components/schemas/DimensionOverrides'
        metricOverrides:
          $ref: '#/components/schemas/MetricOverrides'
        piv

# --- truncated at 32 KB (52 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lightdash/refs/heads/main/openapi/lightdash-exploring-api-openapi.yml