Skip to main content
GET
/
api
/
cost
/
v2
/
allocation
/
accumulated
Get accumulated cost allocation over a time window
curl --request GET \
  --url https://api.example.com/api/cost/v2/allocation/accumulated \
  --header 'X-Domino-Api-Key: <api-key>'
{
  "data": [
    {
      "allocationProperties": {},
      "cpu": {
        "coreHours": 123,
        "coreRequestAverage": 123,
        "coreUsageAverage": 123,
        "cores": 123,
        "cost": 123,
        "costAdjustment": 123,
        "efficiency": 123
      },
      "end": "<string>",
      "externalCost": 123,
      "gpu": {
        "cost": 123,
        "costAdjustment": 123,
        "count": 123,
        "hours": 123
      },
      "key": {},
      "labels": {
        "billingTag": "<string>",
        "organizationId": "<string>",
        "organizationName": "<string>",
        "projectId": "<string>",
        "projectName": "<string>",
        "projectOwnerId": "<string>",
        "projectOwnerName": "<string>",
        "startingUserId": "<string>",
        "startingUserName": "<string>",
        "workloadId": "<string>",
        "workloadType": "<string>"
      },
      "loadBalancer": {
        "cost": 123,
        "costAdjustment": 123
      },
      "minutes": 123,
      "network": {
        "cost": 123,
        "costAdjustment": 123,
        "crossRegionCost": 123,
        "crossZoneCost": 123,
        "internetCost": 123,
        "receiveBytes": 123,
        "transferBytes": 123
      },
      "pv": {
        "byteHours": 123,
        "bytes": 123,
        "cost": 123,
        "costAdjustment": 123,
        "pvs": {}
      },
      "ram": {
        "byteHours": 123,
        "byteRequestAverage": 123,
        "byteUsageAverage": 123,
        "bytes": 123,
        "cost": 123,
        "costAdjustment": 123,
        "efficiency": 123
      },
      "sharedCost": 123,
      "start": "<string>",
      "totalCost": 123,
      "totalEfficiency": 123,
      "window": {
        "end": "<string>",
        "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

interval
string

Interval to accumulate the costs. Accepts hour, day, week

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

limit
integer

Max number of rows to fetch. Defaults to 1000.

offset
integer

How many rows from the start to skip. Defaults to 0.

Response

Success

data
object[]
required