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 49 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.2.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.2.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.

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

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 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
Lightdash Feature Flag 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.