Skip to main content
GET
/
api
/
cost
/
v1
/
allocation
Get the cost allocation over a time window
curl --request GET \
  --url https://api.example.com/api/cost/v1/allocation \
  --header 'X-Domino-Api-Key: <api-key>'
{
  "data": [
    {
      "cpuCoreHours": 123,
      "cpuCoreRequestAverage": 123,
      "cpuCoreUsageAverage": 123,
      "cpuCores": 123,
      "cpuCost": 123,
      "cpuCostAdjustment": 123,
      "cpuEfficincy": 123,
      "discount": 123,
      "gpuCost": 123,
      "gpuCostAdjustment": 123,
      "gpuCount": 123,
      "gpuHours": 123,
      "labels": {
        "billing_tag": "<string>",
        "organization_id": "<string>",
        "organization_name": "<string>",
        "project_id": "<string>",
        "project_name": "<string>",
        "project_owner_id": "<string>",
        "project_owner_name": "<string>",
        "starting_user_id": "<string>",
        "starting_user_name": "<string>",
        "workload_id": "<string>",
        "workload_type": "<string>"
      },
      "loadBalancerCost": 123,
      "loadBalancerCostAdjustment": 123,
      "name": "<string>",
      "nodeType": "<string>",
      "pv": {
        "pvByteHours": 123,
        "pvBytes": 123,
        "pvCost": 123,
        "pvCostAdjustment": 123,
        "pvs": {}
      },
      "ramCost": 123,
      "ramCostAdjustment": 123,
      "totalCost": 123,
      "window": {
        "end": "<string>",
        "minutes": 123,
        "start": "<string>"
      }
    }
  ]
}

Authorizations

X-Domino-Api-Key
string
header
required

Query Parameters

window
string
required

Duration of time over which to query. Accepts words like today, week, month, yesterday, lastweek, lastmonth; durations like 30m, 12h, 7d, or time like 2021-03-10T00:00:00Z,2021-03-11T00:00:00Z

aggregate
string

Aggregate the cost allocation. Accepts kubecost aggregates cluster, namespace, pod, deployment, service, daemonset, statefulset, job, cronjob, replicaset, node, container, pv, pvc, storageclass, cluster

start
string

Start time of the query. Accepts RFC3339 format, must be inside the window

end
string

End time of the query. Accepts RFC3339 format, must be inside the window

accumulate
boolean

If the result will be accumulated. Default is false. If true, the result will be accumulated from the start time to the end time.

filter
string

Filter the result by the kubecost filter like cluster, namespace, pod, deployment, service, daemonset, statefulset, job, cronjob, replicaset, node, container, pv, pvc, storageclass, cluster.

shareIdle
boolean

if the idle cost will be shared

shareNamespaces
string

list of namespaces to share the costs

shareSplit
string

Determines how to split shared costs among non-idle, unshared allocations.

shareCost
string

The cost to share

shareLabels
string

The label to share the cost

reconcile
boolean

If the cost will be reconciled

shareTenancyCosts
boolean

If the tenancy costs will be shared

idle
boolean

If the idle cost will be calculated

external
boolean

If the external cost will be calculated

Response

200 - application/json

Success

data
object[]
required