Skip to main content
GET
Get the organisation's fleet cost rollup

Authorizations

Authorization
string
header
required

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

Headers

x-ankra-organisation-id
string

PAT organisation override.

Query Parameters

project_id
string

The project to read: a project's id, or all for the whole organisation. Absent reads the caller's current project (the whole organisation while projects are off). A token pinned to a project, or a member limited to projects, may name only their own project.

Response

Successful response

by_credential
FleetCredentialCost · object[]
required
by_provider
FleetProviderCost · object[]
required
cluster_count
integer
required
clusters
FleetClusterCost · object[]
required
currency
string
required
month_hours
MonthHours · object | null
required

The hours of every cluster month_to_date_cents counts, the unmetered ones included, summed (MonthHours). Null when no cluster is counted or any counted cluster's hours are missing.

month_to_date_cents
integer
required
monthly_cost_estimate_cents
integer
required
projected_month_end_cents
integer
required
top_clusters
FleetClusterCost · object[]
required
generated_at
string<date-time> | null
required

When the newest cost snapshot behind these figures was computed (RFC 3339, UTC), so a reader can say how fresh they are rather than when it asked. Null when no cluster has a snapshot in the window.

stale_cluster_count
integer
required

How many of unmetered_clusters are live clusters whose node inventory went stale (is_inventory_stale): their spend since they were last metered is in no figure here, so with any of them the month end is a floor.

unmetered_clusters
FleetUnmeteredCluster · object[]
required

The clusters in scope that spent money this month but carry no fresh snapshot: deleted this month, with metering that has stalled, or - on a project read - moved to another project after spending under this one; every live cluster priced before whose node inventory went stale, spent this month or not; and every live cluster whose fresh snapshot priced nothing, with is_unpriced, spent this month or not. What they spent is part of month_to_date_cents and projected_month_end_cents; they add no pace and are not in clusters or cluster_count. by_project carries their spend under the projects it was stamped with, by_credential under the credentials it was stamped with, and by_provider under the provider of each one's last snapshot, none of them counting it as a cluster.

unmetered_month_to_date_cents
integer
required

What the unmetered clusters spent this month, in the display currency: the part of month_to_date_cents no metered cluster accounts for. by_provider, by_credential and by_project each carry it already, so each of them alone sums to month_to_date_cents.

scope
CostReadScope · object
required

What a fleet cost read covered (ADR 0022): the project it read, or the whole organisation, and whether the caller's cluster permissions hid clusters from it.

by_project
FleetProjectCost · object[]
required

The month split by project, with the unattributed bucket; it sums to the totals above, unmetered spend included.

unpriced_cluster_count
integer
required

How many live, unarchived clusters in scope no fresh cost snapshot prices and that are not known to spend nothing: the same rule a budget over the same clusters states its unpriced_cluster_count by. It counts a cluster with no snapshot in the last day, one whose node inventory went stale, and one whose fresh snapshot priced nothing (the unmetered_clusters entries with is_unpriced, which name a subset of it). Their pace is unknown, never zero, so while this is above zero monthly_cost_estimate_cents and projected_month_end_cents are floors. A cluster Ankra stopped that holds no machine is not counted. They are not in clusters or cluster_count.