How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Lightdash Query API

These routes allow users to execute and manage queries against their data warehouse. This includes metric queries, SQL queries, and retrieving query results.

Lightdash Query API is one of 50 APIs that Lightdash publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 8 JSON Schema definitions.

Tagged areas include Query. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and 8 JSON Schemas.

This API exposes 13 operations across 13 paths, and defines 176 schemas. It is described by OpenAPI 3.0.0, at version 0.3156.1.

Requests are made against a single base URL, /.

13 operations 13 paths 176 schemas 1 GET12 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
0.3156.1
Base URL
https://app.lightdash.cloud
Authentication
API Key, API Key
License
MIT
Resource Areas
1

Authentication & Security 2

Lightdash Query API declares 2 security schemes for authenticating requests. An API key is passed in the cookie as connect.sid (session_cookie). An API key is passed in the header as Authorization (api_key).

  • api_key — Value should be 'ApiKey '

Paths & Operations 13

Across 13 paths, the API surfaces 13 operations — 1 GET, 12 POST. Each is listed below with its method, path, parameters, and response codes.

Query 13

These routes allow users to execute and manage queries against their data warehouse. This includes metric queries, SQL queries, and retrieving query results.

GET
/api/v2/projects/{projectUuid}/query/{queryUuid}
Get results
getAsyncQueryResults 4 params → 200default
POST
/api/v2/projects/{projectUuid}/query/{queryUuid}/cancel
Cancel query
cancelAsyncQuery 2 params → 200default
POST
/api/v2/projects/{projectUuid}/query/{queryUuid}/calculate-total
Calculate totals
executeAsyncCalculateTotal 2 params body → 200default
POST
/api/v2/projects/{projectUuid}/query/metric-query
Execute metric query
executeAsyncMetricQuery 1 param body → 200default
POST
/api/v2/projects/{projectUuid}/query/field-values
Search field values
executeAsyncFieldValueSearch 1 param body → 200default
POST
/api/v2/projects/{projectUuid}/query/chart
Execute saved chart
executeAsyncSavedChartQuery 1 param body → 200default
POST
/api/v2/projects/{projectUuid}/query/dashboard-chart
Execute dashboard chart
executeAsyncDashboardChartQuery 1 param body → 200default
POST
/api/v2/projects/{projectUuid}/query/underlying-data
Execute underlying data
executeAsyncUnderlyingDataQuery 1 param body → 200default
POST
/api/v2/projects/{projectUuid}/query/sql
Execute SQL query
executeAsyncSqlQuery 1 param body → 200default
POST
/api/v2/projects/{projectUuid}/query/sql-chart
Execute SQL chart
executeAsyncSqlChartQuery 1 param body → 200default
POST
/api/v2/projects/{projectUuid}/query/dashboard-sql-chart
Execute dashboard SQL chart
executeAsyncDashboardSqlChartQuery 1 param body → 200default
POST
/api/v2/projects/{projectUuid}/query/{queryUuid}/downloaddeprecated
Download results
downloadResults 2 params body → 200default
POST
/api/v2/projects/{projectUuid}/query/{queryUuid}/schedule-download
Download results
scheduleDownloadResults 2 params body → 200default

Schemas 176

The contract defines 176 schemas that model the data the API accepts and returns. The most detailed are Metric (33 properties), AdditionalMetric (23 properties), Field (20 properties), Pick_MetricQueryRequest.Exclude_keyofMetricQueryRequest.csvLimit__ (15 properties). Each schema is shown below with its type and property counts.

DateZoom
object
2 properties
ApiDownloadAsyncQueryResults
object
1 property 1 required
ApiExecuteAsyncMetricQueryResults
ApiSuccess_ApiDownloadAsyncQueryResults-or-ApiDownloadAsyncQueryResultsAsCsv-or-ApiDownloadAsyncQueryResultsAsXlsx_
object
2 properties 2 required
FieldUrl
object
2 properties 2 required
ApiExecuteAsyncFieldValueSearchResults
object
2 properties 2 required
DashboardTileTarget
ApiExecuteAsyncQueryResultsCommon
object
5 properties 5 required
DateGranularity
string
ReadyQueryResultsPage
Pick_CompiledDimension.name-or-label-or-table_
object
From T, pick a set of properties whose keys are in the union K
PivotConfiguration
object
9 properties 1 required
Metric
object
33 properties 8 required
CommonExecuteQueryRequestParams
object
4 properties
PreAggregateMissReason.NO_PRE_AGGREGATES_DEFINED
string
QueryResultsPerformance
object
3 properties 3 required
FieldType.METRIC
string
FilterGroup
ApiErrorPayload
object
The Error object is returned from the api any time there is an error. The message contains
2 properties 2 required
Pick_Metric.formatOptions_
object
From T, pick a set of properties whose keys are in the union K
1 property
ResultRow
ItemsMap
Pick_Dimension.formatOptions_
object
From T, pick a set of properties whose keys are in the union K
1 property
ApiSuccess_ApiExecuteAsyncDashboardSqlChartQueryResults_
object
2 properties 2 required
ExecuteAsyncFieldValueSearchRequestParams
OrFilterGroup
object
2 properties 2 required
FixedWidthBinDimension
object
7 properties 7 required
QueryWarning
object
3 properties 1 required
PreAggregateMissReason.NON_ADDITIVE_METRIC
string
QueryHistoryStatus.QUEUED
string
DimensionOverrides
object
BinType.FIXED_NUMBER
string
ApiGetAsyncQueryResults
ResultColumn
object
2 properties 2 required
Record_string.Field-or-TableCalculation-or-CustomDimension-or-Metric_
object
Construct a type with a set of properties K of type T
ApiGetAsyncQueryResultsResponse
object
2 properties 2 required
DownloadFileType
string
ExecuteAsyncSavedChartRequestParams
TableCalculationTemplateType.PERCENT_OF_PREVIOUS_VALUE
string
ResultValue
object
2 properties 2 required
TableCalculationType
string
CustomGroupBinDimension
object
7 properties 7 required
Record_string.DashboardTileTarget_
object
Construct a type with a set of properties K of type T
PreAggregateMissReason.EXPLORE_RESOLUTION_ERROR
string
FrameBoundaryType
string
ApiJobScheduledResponse
object
2 properties 2 required
FormulaTableCalculation
PreAggregateMissReason.METRIC_NOT_IN_PRE_AGGREGATE
string
DashboardFilterRule
FrameType
string
Omit_DownloadAsyncQueryResultsRequestParams.queryUuid_
Construct a type with the properties of T except for those in type K.
FieldId
string
SortByDirection
string
Pick_MetricQueryRequest.Exclude_keyofMetricQueryRequest.csvLimit__
object
From T, pick a set of properties whose keys are in the union K
15 properties 7 required
ExecuteAsyncSqlQueryRequestParams
ExecuteAsyncCalculateTotalRequestParams
object
3 properties 1 required
ApiExecuteAsyncSqlQueryResults
CacheMetadata
object
5 properties 1 required
ExecuteAsyncUnderlyingDataRequestParams
DefaultTimeDimension
object
2 properties 2 required
QueryHistoryStatus.CANCELLED
string
BinRange
object
2 properties
FilterGroupItem
FieldTarget
object
1 property 1 required
PreAggregateMissReason.GRANULARITY_TOO_FINE
string
MetricOverrides
object
SortBy
array
QueryHistoryStatus.ERROR
string
Omit_MetricQueryRequest.csvLimit_
Construct a type with the properties of T except for those in type K.
ApiDownloadAsyncQueryResultsAsCsv
object
2 properties 2 required
Record_string.string-or-string-Array_
object
Construct a type with a set of properties K of type T
QueryHistoryStatus.EXPIRED
string
ExecuteAsyncDashboardSqlChartCommonParams
PreAggregateMissReason.USER_BYPASS
string
Filters
object
3 properties
PreAggregateMatchMiss
CompactOrAlias
BinGroup
object
2 properties 2 required
AdditionalMetric
object
23 properties 4 required
ApiSuccess_ApiExecuteAsyncSqlQueryResults_
object
2 properties 2 required
Pick_DownloadAsyncQueryResultsRequestParams.Exclude_keyofDownloadAsyncQueryResultsRequestParams.queryUuid__
object
From T, pick a set of properties whose keys are in the union K
9 properties
ExecuteAsyncDashboardSqlChartRequestParams
Source
object
4 properties 3 required
FrameBoundary
object
2 properties 1 required
DimensionType
string
TableCalculationTemplateType.PERCENT_CHANGE_FROM_PREVIOUS
string
Record_string.ResultColumn_
object
Construct a type with a set of properties K of type T
QueryResultsMetadata
object
1 property 1 required
MetricQuery
object
14 properties 7 required
ApiSuccess_ApiExecuteAsyncMetricQueryResults_
object
2 properties 2 required
QueryHistoryStatus.EXECUTING
string
SortField
object
4 properties 2 required
MetricType
string
NumberSeparator
string
CustomBinDimension
VizAggregationOptions
string
GroupValueRule
object
2 properties 2 required
PivotIndexColum
object
2 properties 2 required
FrameClause
object
3 properties 2 required
Pick_CompiledDimension.label-or-name-or-table_
object
From T, pick a set of properties whose keys are in the union K
3 properties 3 required
TableCalculationTemplateType.WINDOW_FUNCTION
string
DashboardFilters
object
3 properties 3 required
AnyType
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 onl…
TableCalculation
FieldType
string
TimeFrames
string
ApiSuccessEmpty
object
2 properties 1 required
FilterRule
object
8 properties 3 required
FilterRule_FilterOperator.DashboardFieldTarget.AnyType.AnyType_
object
8 properties 3 required
PreAggregateMissReason.PRE_AGGREGATE_FILTER_NOT_SATISFIED
string
PreAggregateMissReason.NO_ACTIVE_MATERIALIZATION
string
ExecuteAsyncDashboardSqlChartByUuidRequestParams
SqlTableCalculation
PreAggregateMissReason.CUSTOM_DIMENSION_PRESENT
string
PreAggregateMissReason.DIMENSION_NOT_IN_PRE_AGGREGATE
string
Field
object
20 properties 8 required
QueryHistoryStatus.PENDING
string
PreAggregateMissReason.CUSTOM_SQL_METRIC
string
FixedNumberBinDimension
object
7 properties 7 required
Record_string._value-ResultValue__
object
Construct a type with a set of properties K of type T
BinType.CUSTOM_RANGE
string
ApiSuccess_ApiExecuteAsyncFieldValueSearchResults_
object
2 properties 2 required
GroupValueMatchType
string
Compact
string
VizSortBy
object
4 properties 2 required
PivotValuesColumn
object
5 properties 4 required
ApiDownloadAsyncQueryResultsAsXlsx
object
2 properties 2 required
ParameterValue
TableCalculationTemplateType.RUNNING_TOTAL
string
QueryExecutionContext
string
CalculateTotalKind
string
Kinds of totals derivable from an executed pivot query. Follow-up PRs will widen the union to enable the commented-out variants below.
GroupByColumn
object
1 property 1 required
ParametersValuesMap
BinType.CUSTOM_GROUP
string
CustomFormat
object
9 properties 1 required
WindowFunctionType
string
ApiExecuteAsyncDashboardChartQueryResults
CustomRangeBinDimension
object
7 properties 7 required
PivotSortAnchor
object
Coordinates of a single pivot column, used to anchor a row sort to that specific column when results are pivoted.
2 properties 2 required
TableCalculationBase
object
5 properties 2 required
TableCalculationTemplate
TableCalculationTemplateType.RANK_IN_COLUMN
string
Record_string.ParameterValue_
object
Construct a type with a set of properties K of type T
ResultColumns
TemplateTableCalculation
TableCalculationTemplateType.PERCENT_OF_COLUMN_TOTAL
string
ApiExecuteAsyncDashboardSqlChartQueryResults
BinType.FIXED_WIDTH
string
DashboardFieldTarget
object
4 properties 2 required
ApiSuccess_ApiExecuteAsyncDashboardChartQueryResults_
object
2 properties 2 required
ExecuteAsyncMetricQueryRequestParams
PreAggregateMissReason.CUSTOM_METRIC_PRESENT
string
SourcePosition
object
2 properties 2 required
ExecuteAsyncSqlChartBySlugRequestParams
QueryHistoryStatus.READY
string
ValuesColumn
object
2 properties 2 required
FilterOperator
string
KnexPaginateArgs
object
2 properties 2 required
PreAggregateMissReason.FILTER_DIMENSION_NOT_IN_PRE_AGGREGATE
string
CustomDimensionType.BIN
string
ExecuteAsyncSqlChartByUuidRequestParams
ExecuteAsyncSqlChartRequestParams
CustomFormatType
string
ExecuteAsyncDashboardChartRequestParams
PivotConfig
object
8 properties 2 required
VizIndexType
string
Record_string.string_
object
Construct a type with a set of properties K of type T
PreAggregateMissReason.TABLE_CALCULATION_PRESENT
string
ExecuteAsyncDashboardSqlChartBySlugRequestParams
CustomSqlDimension
object
6 properties 6 required
AndFilterGroup
object
2 properties 2 required
Format
string
CustomDimension
MetricFilterRule
object
Filter rule for metrics, targeting fields by reference
8 properties 3 required
CustomDimensionType.SQL
string
ResultsPaginationMetadata_ResultRow_

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

lightdash-query-api-openapi.yml Raw ↑

Other APIs Lightdash publishes across the network.

Lightdash AiAgents API
Lightdash Bulk action API
Lightdash Catalog API
Lightdash Changesets API
Lightdash Charts API
Lightdash Comments API
Lightdash Content API
Lightdash Custom Roles API
Lightdash Dashboards API
Lightdash Explorer API
Lightdash Exploring API
Lightdash Exports API
Where this information came from

This is an independent, third-party profile of Lightdash Query API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.