Skip to main content
POST
Execute point-in-time engineering metrics queries

Authorizations

Authorization
string
header
required

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Body

application/json

Point-in-time metrics query request for batch processing

endTime
string<date-time>
required

End time for the query period

filters
object[]
required

Filters to apply to the data

groupBy
string[]
required

Fields to group results by

Fields to group results by

limit
integer<int32>
required

Maximum number of results to return

metrics
object[]
required

List of metrics to query with their aggregation functions

orderBy
object[]
required

Sort order for results

startTime
string<date-time>
required

Start time for the query period

comparison
object

Optional comparison to previous time period

daysOfWeek
integer<int32>[]

Optional day-of-week restriction (ISO: Monday=1..Sunday=7). When set, the query filters out rows whose time-attribute does not fall on one of these weekdays. Use {1,2,3,4,5} to exclude weekends. Empty set matches nothing.

Optional day-of-week restriction (ISO: Monday=1..Sunday=7). When set, the query filters out rows whose time-attribute does not fall on one of these weekdays. Use {1,2,3,4,5} to exclude weekends. Empty set matches nothing.

nestedAggregations
object[]

Nested aggregations for advanced sub-queries

nextPage
string

Pagination token for next page of results

timeAttribute
string

Deprecated: use timeAttributes instead. Single time attribute override as a fully-qualified path (e.g. 'pull_requests.date_closed').

timeAttributes
string[]

Time attributes to use for queries. Each entry is a fully-qualified attribute path (e.g. 'pull_requests.date_closed'). The source is inferred from the prefix. For single-source queries, provide one entry. For multi-source, provide one per source to override.

Time attributes to use for queries. Each entry is a fully-qualified attribute path (e.g. 'pull_requests.date_closed'). The source is inferred from the prefix. For single-source queries, provide one entry. For multi-source, provide one per source to override.

Response

Successfully executed metrics query

metadata
object
required

Query metadata describing the structure of returned columns

rows
object[][]
required

Result rows, one array per grouping. Cells are positional: the value at index i corresponds to metadata.columns[i], and its JSON type follows that column's type (string, number, boolean, or null). Rows are not keyed by column name.

Result rows, one array per grouping. Cells are positional: the value at index i corresponds to metadata.columns[i], and its JSON type follows that column's type (string, number, boolean, or null). Rows are not keyed by column name.

Example:
Example:
Last modified on September 29, 2026