For the complete documentation index, see llms.txt. This page is also available as Markdown.

Query AWS Cloud Costs

Query AWS Cost and Usage Report line items and chart cloud costs with gcQL.

Query AWS Cost and Usage Report (CUR) data collected by your AWS integration. These endpoints are available on supported AWS BYOC backends. Unsupported environments return HTTP 501.

Endpoints

Operation
Endpoint

Search cost line items

POST /api/aws-cur/search

Query costs over time

POST /api/aws-cur/search-time-series

Authentication

Send an API key in Authorization: Bearer <YOUR_API_KEY> and select the backend with X-Backend-Id: <YOUR_BACKEND_ID>.

Request Body

Field
Type
Description

start, end

string

Time range in RFC3339 format.

query

string

gcQL query over cost line items.

pipeline

object

Alternative structured query. Supply exactly one of query or pipeline.

sources

array

Optional structured scope conditions.

filters

string

Optional additional filters.

bucketDuration

string

Time-series interval. Optional; defaults to one day (24h).

valueField

string

Numeric result alias to chart.

fillValue

number

Optional replacement for empty buckets; defaults to null.

Unlike APM and ingestion measurements, cost queries do not require a signal or pipeline-stage filter. _time refers to the usage start time of each cost line item.

Example: Cost by AWS Product

The response contains data rows and valueFieldHints listing numeric columns. For example:

The amounts above are illustrative. Available cost measures include unblended_cost, net_unblended_cost, amortized_cost, and net_amortized_cost. Group by currency when the selection may contain different currencies. Useful dimensions include region, usage_account_id, resource_id, operation, and integration_name.

Example: Daily Cost

The response is an array of series containing metric labels and velocity timestamp/value points. See Time-Series Queries.

Time Range and Report Granularity

Cost reports may arrive later than the usage they describe. Empty recent buckets do not necessarily mean zero cost, so leave fillValue unset when you want to preserve missing data.

The API includes only report granularities that fit the requested bucket: buckets below one day include hourly reports; buckets from one day to less than 28 days include hourly and daily reports; larger buckets also include monthly reports. Unknown granularities are excluded. For tabular searches, the whole requested window determines this selection. Do not ingest overlapping exports of the same usage at multiple granularities if you intend to sum them together.

Errors

Malformed requests, invalid gcQL, or supplying both query and pipeline return HTTP 400. Unsupported environments return 501 with the message This data isn't available in this environment. Backend query failures return 500.

Last updated