---
title: "Get Kubernetes cost"
method: GET
path: "/api/v1/kubernetes/cost-and-usage"
tags: ["Kubernetes"]
---

# Get Kubernetes cost

`GET /api/v1/kubernetes/cost-and-usage`

## Request

- Base URL: `https://api.umbrellacost.io`
- URL: `https://api.umbrellacost.io/api/v1/kubernetes/cost-and-usage`
- Auth: none declared. Required headers: `Authorization`, `apikey`

The call is used to retrieve kubernetes data grouped and filtered by different values

## Query parameters

- `groupBy` string, required
- `startDate` string, date, required
- `endDate` string, date, required
- `periodGranLevel	` string, required
- `costUsageType` string, required
- `usageType` string
- `metricType` string
- `isNetUnblended` boolean
- `isAmortized` string
- `isNetAmortized` string
- `wheres` string
- `filters` string
- `excludeFilters` string

## Headers

- `Authorization` string, required
- `apikey` string, required

## Response `200`

- object
  - `data` object
  - `groupBy` string
  - `usageDate` string
  - `accountId` string
  - `clusterName` string
  - `totalCost` integer
  - `totalUsage` string
  - `nextPage` string

---

[API](https://skmtc.dev/umbrellacost/apis/cost-usage.md) - [All operations](https://skmtc.dev/umbrellacost/apis/cost-usage/llms.txt) - [OpenAPI document](https://skmtc.dev/umbrellacost/apis/cost-usage/revisions/c5ae311d18ae?raw)
