Skip to main content
GET
Error
Astronomer writes usage data with a scheduled sync and doesn’t publish a data freshness service level agreement for this endpoint. The most recent usage date is often still loading when you query it, so every response reports how far the load has progressed: Both fields describe all usage data for the Organization, not only the rows that match your filters. The response omits both fields when the Organization has no cost data. A finished load doesn’t mean the values are final. The cost and qty values for a date on or before completeThroughDate can still change on a later sync. Restatements are usually limited to the last 4 days. Corrections further back are possible, but uncommon. For a daily export:
  1. Query with a short rolling lookback window, for example 7 days, by setting startDate a few days before endDate. The overlap picks up restated rows.
  2. Keep only rows dated on or before completeThroughDate, and load later rows on a future run.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

The ID of the Organization to retrieve cost data for.

Query Parameters

startDate
string
required

Start of the date range (YYYY-MM-DD).

endDate
string
required

End of the date range (YYYY-MM-DD). Range must not exceed 12 months.

workspaceId
string[]

Filter by workspace ID. At most 1000.

deploymentId
string[]

Filter by deployment ID. At most 1000.

format
enum<string>
default:astronomer

Response shape.

Available options:
astronomer,
focus
offset
integer
default:0

The number of results to skip before returning values (offset mode; ignored when pageToken/pageSize is set).

Required range: x >= 0
limit
integer
default:20

The maximum number of results to return (offset mode). Maximum: 1000.

Required range: 1 <= x <= 1000
sorts
enum<string>[]

Fields to sort by, formatted as <fieldName>:asc or <fieldName>:desc. Applies to offset and cursor mode.

Available options:
id:asc,
id:desc,
date:asc,
date:desc,
organizationId:asc,
organizationId:desc,
workspaceId:asc,
workspaceId:desc,
deploymentId:asc,
deploymentId:desc,
resource:asc,
resource:desc,
cost:asc,
cost:desc,
qty:asc,
qty:desc,
unit:asc,
unit:desc
pageSize
integer

Cursor page size.

Required range: 1 <= x <= 1000
pageToken
string

Opaque cursor page token.

Response

OK

format
enum<string>
required

Discriminates this response from the FOCUS-format variant when multiple are valid oneOf choices (e.g. an empty items page).

Available options:
astronomer,
focus
Example:

"astronomer"

items
object[]
required

The list of deployment resource costs in the current page.

limit
integer
required

The maximum number of results in one page.

Example:

20

nextPageToken
string
required

Cursor mode (AIP-158) fields. NextPageToken is empty string on the last page (per spec — do not use omitempty). PageSize echoes the effective page size when the caller opted into cursor mode.

offset
integer
required

The offset of the current page of results.

Example:

0

pageSize
integer
required
previousPageToken
string
required
totalCount
integer
required

The total number of deployment resource cost rows matching the query.

Example:

15196

completeThroughDate
string

The last day whose load has finished, in UTC. Later days may still be incomplete. Empty when the Organization has no cost data.

Example:

"2026-06-04"

dataAsOf
string<date-time>

Load watermarks. The rows are written by a scheduled sync, so the most recent day is often still filling in.