Skip to main content
POST

Authorizations

Authorization
string
header
required

Organization API key (sl_…).

Headers

x-team-id
string<uuid> | null

Act as this team: rows are limited to what the team's roles reach instead of the caller's own. The caller must be a member of the team or hold the organization-wide permission the route requires.

x-tenant-id
string
required

The organization ID the request is scoped to.

Body

application/json

Aggregate BigQuery capacity commitments by scope.

A scope is one administration project, region and edition, the boundary BigQuery draws around shared capacity. A commitment covers only reservations of its own edition in its own administration project and region, and idle slots are lent within exactly that boundary, so capacity never pools across scopes and each is priced on its own.

Group by commitment_scope_id for one row per scope, or omit dimensions for the organization's totals.

Measures come in two kinds. Holdings (committed_slots, commitment_count, baseline_slots) describe what is held right now and do not move with the date range. Everything billed (costs, slot-seconds, utilization) covers the requested range. The two disagree on a recent purchase: a commitment counts as held from the moment it is signed, while the capacity it buys reaches the bill later.

A date range is required. It bounds the billed measures, and without it they would silently cover all of history.

measures
(SemiStructuredMeasure[OrgBigQueryCommitmentScopeDimensions] · object | enum<string>)[]

Aggregates to compute over the matching rows.

dimensions
(SemiStructuredDimension[OrgBigQueryCommitmentScopeDimensions] · object | enum<string>)[]

Columns to group the aggregates by. Each is returned on every row.

filter_expression
FilterExpression[Union[SemiStructuredDimension[OrgBigQueryCommitmentScopeDimensions], OrgBigQueryCommitmentScopeDimensions]] · object | null

An and/or tree of predicates over dimensions, applied before aggregation. Omit to match every row the caller can see.

measure_filters
(InFilter[OrgBigQueryCommitmentScopeMeasures] · object | ArrayContainsFilter[OrgBigQueryCommitmentScopeMeasures] · object | IsFilter[OrgBigQueryCommitmentScopeMeasures] · object | LikeFilter[OrgBigQueryCommitmentScopeMeasures] · object | MultiLikeFilter[OrgBigQueryCommitmentScopeMeasures] · object | EqFilter[OrgBigQueryCommitmentScopeMeasures] · object | FilterExpression[OrgBigQueryCommitmentScopeMeasures] · object | InRelativeDateRangeFilter[OrgBigQueryCommitmentScopeMeasures] · object)[]

Predicates over measures, applied after aggregation.

sort
Sort[OrgBigQueryCommitmentScopeMeasures, OrgBigQueryCommitmentScopeDimensions] · object[]

Ordering applied to the aggregated rows.

limit
integer | null

Maximum rows to return. Omit for no limit. An aggregation that produces more rows than this is silently cut short at the limit.

Required range: x >= 1
return_sql
boolean
default:false

Return the SQL that produced the rows alongside them, for inspecting how a result was computed. Not every query endpoint publishes its SQL; where it does not, the field stays null.

pivot
PivotConfig · object | null

Reshape the result so the named dimensions become columns rather than rows. Each remaining dimension yields one row, carrying a pivot_data object keyed by the pivoted dimension values. Every name in pivot.on must also appear in dimensions.

rollup
GroupRollupConfig · object | null

Return the result as a tree rather than a flat list, grouping the named dimensions into one level per tree depth. One request fetches the top level; a follow-up naming rollup.parent_paths fetches the children of the nodes expanded so far, so a deep hierarchy is read a level at a time. Every name in rollup.dimensions must also appear in dimensions.

aggregate
boolean
default:true

Aggregate the matching rows. Set false to return the underlying rows as they are, projecting the requested dimensions with no grouping — a listing rather than an aggregation. It is honored only for a request that asks for no measures and no measure_filters, since an aggregate has to group to be computable; limit, when set, bounds the rows returned either way.

Response

Successful Response

items
Items · object[]
required
page_token
string | null

Opaque cursor for the next page; empty/absent on the last page.

row_count
integer | null

Best-effort total for the filtered result set; may be null when expensive.

sql
string | null

The SQL that produced these rows, returned only when the request asks for it. Database and schema names are left as placeholders. Null when the request did not ask for it, or when this endpoint does not publish its SQL.