Allocation API
Allocation API (Querying)
GET
http://app.kubecost.com/query/allocation/query
The Allocation API is the preferred way to query for costs and resources allocated to Kubernetes workloads and optionally aggregated by Kubernetes concepts like namespace
, controller
, and label
.
Path Parameters
Name | Type | Description |
---|---|---|
window* | string | Duration of time over which to query. Accepts multiple formats including units of time, relative time units, and unix timestamps. See this section on using the |
format | string | File type when exporting query. Currently only supports |
aggregate | string | Field by which to aggregate the results. Accepts: |
accumulate | boolean | If |
idle | boolean | If |
idleByNode | boolean | If |
limit | int | Refers to the number of line items per page. Currently, only supported together with |
filter | string | Filter your results by any category which you can aggregate by, can support multiple filterable items in the same category in a comma-separated list. For example, to filter results by clusters A and B, use |
Allocation API (Total)
GET
http://app.kubecost.com/query/allocation/totals
The Allocation API is the preferred way to query for costs and resources allocated to Kubernetes workloads. The /totals
endpoint does not aggregate, and accepts only a window and an optional filter, returning a single total cost.
Path Parameters
Name | Type | Description |
---|---|---|
window* | string | Duration of time over which to query. Accepts multiple formats including units of time, relative time units, and unix timestamps. See this section on using the |
format | string | File type when exporting query. Currently only supports |
filter | string | Filter your results by any category which you can aggregate by, can support multiple filterable items in the same category in a comma-separated list. For example, to filter results by clusters A and B, use |
Last updated