--- title: "K8sCosts: ClusterCosts: DataSeries" slug: "k8scosts-clustercosts-dataseries" updated: 2026-11-22T22:59:04Z published: 2026-11-22T22:59:04Z canonical: "resources.realtheory.io/k8scosts-clustercosts-dataseries" --- > ## Documentation Index > Fetch the complete documentation index at: https://resources.realtheory.io/llms.txt > Use this file to discover all available pages before exploring further. # K8sCosts: ClusterCosts: DataSeries This model describes the DataSeries returned by the ClusterCosts methods on the [K8sCost](https://api-dev.realtheory.io/swagger/k8scost/index.html) endpoint, which contains a time series of cost data for a Kubernetes Cluster. It is returned by the following methods: - `GET <endpoint>/theory/api/v1/k8scost/clustercosts/{id}/{unitOfMeasure}/{currencyCode}` - returns the costs of the Cluster with the specified ID. - `GET <endpoint>/theory/api/v1/k8scost/clustercosts/{id}/{unitOfMeasure}/{currencyCode}/{transforms}` - returns the transformed costs of the Cluster with the specified ID. - `POST <endpoint>/theory/api/v1/k8scost/clustercosts/filter/{unitOfMeasure}/{currencyCode}` - returns an array of DataSeries, one for each of the Clusters with the specified IDs. - `POST <endpoint>/theory/api/v1/k8scost/clustercosts/filter/{unitOfMeasure}/{currencyCode}/{transforms}` - returns an array of DataSeries containing the transformed costs, one for each of the Clusters with the specified IDs. A DataSeries is a table of values. The `names` and `types` attributes describe the columns, and each entry in `samples` is a row, holding the values for one point in time. The value at position *n* in a sample's `values` corresponds to the name and type at position *n* in `names` and `types`. #### Example: ``` { "id": "f99e055f-b35d-208b-63b1-f4222b80151a", "names": [ "kubernetes", "load_balancer", "nodes", "cpu", "memory", "gpu", "storage", "network", "overhead", "total", "unit_of_measure", "currency_code", "cpu_utilization", "memory_utilization", "utilization", "effective_utilization", "idle", "idle_time", "efficiency" ], "types": [ "decimal", "decimal", "decimal", "decimal", "decimal", "decimal", "decimal", "decimal", "decimal", "decimal", "string", "string", "float", "float", "float", "float", "decimal", "float", "float" ], "samples": [ { "timestamp": "2026-11-21T14:00:00Z", "values": [ "0.10", "0.025", "0.6508", "0.4321", "0.2187", "0.0", "0.0412", "0.0123", "0.0", "0.8293", "1 Hour", "USD", "15.72", "65.7", "40.71", "67.85", "0.5102", "0.0", "21.72" ] } ] } ``` where: - `id`: Represents the ID of the Cluster that the costs belong to. - `names`: Represents the names of the fields included in each sample, in the order they appear in each sample's `values`. - `types`: Represents the data type of each field, in the same order as `names`. Supported values are: - `decimal`: A cost, expressed in the `currency_code` per `unit_of_measure`. - `float`: A percentage, between 0 and 100. - `string`: A text value. - **samples**: Represents the list of data samples, one for each point in time. - `timestamp`: Represents the timestamp of the sample, in UTC. - `values`: Represents the values of the sample, in the same order as `names`. All values are returned as strings, and should be converted using the matching entry in `types`. The following fields are returned by the ClusterCosts methods that do not specify `{transforms}`: - `kubernetes`: Represents the cost of the managed Kubernetes service. - `load_balancer`: Represents the cost of the load balancers. - `nodes`: Represents the cost of the nodes, which is the sum of the `cpu`, `memory` and `gpu` costs. - `cpu`: Represents the cost of the CPUs. - `memory`: Represents the cost of the memory. - `gpu`: Represents the cost of the GPUs. - `storage`: Represents the cost of persistent volume storage. - `network`: Represents the cost of network bandwidth. - `overhead`: Represents the cost of any shared overhead, as defined by a [custom rate card](/v1/docs/k8srates-custom-rate-card). - `total`: Represents the total cost of the Cluster. - `unit_of_measure`: Represents the period of time that each cost covers (for example, `1 Hour`). - `currency_code`: Represents the currency of the costs. Supported values include `USD`. - `cpu_utilization`: Indicates the Cluster's CPU utilization. - `memory_utilization`: Indicates the Cluster's memory utilization. - `utilization`: Indicates the Cluster's overall utilization. - `effective_utilization`: Indicates the Cluster's effective utilization, which is a scaled version of overall utilization. **Note: This field is deprecated**. - `idle`: Represents the non-utilized cost of the Cluster. - `idle_time`: Not supported for Clusters. This field is always 0, and cannot be used in transforms. - `efficiency`: Indicates the Cluster's overall resource efficiency, which is a cost-weighted version of utilization that reflects that CPU, GPU and memory all cost different amounts. **Notes:** - When costs are requested by `Daily` or `Monthly` unit of measure, each sample covers one day or one month. The `timestamp` of a monthly sample is the first day of the month. Monthly costs are the sum of the daily costs in the month, and monthly utilization and efficiency values are the average of the daily values. - When `{transforms}` are specified, each name is the transform that produced the value, in the form `function:field` (for example, `sum:total` or `p99:utilization`), and the series contains a single sample. Supported functions are `first`, `last`, `min`, `max`, `mean`, `sum`, `p50`, `p75`, `p90`, `p95` and `p99`. #### Example with transforms: ``` { "id": "f99e055f-b35d-208b-63b1-f4222b80151a", "names": [ "sum:total", "min:utilization", "max:utilization", "mean:utilization", "p99:utilization" ], "types": [ "decimal", "float", "float", "float", "float" ], "samples": [ { "timestamp": "2026-11-21T14:00:00Z", "values": [ "19.9032", "31.08", "52.47", "40.71", "51.96" ] } ] } ```