--- title: "How To: Get the Daily Cost Report for Deployments" slug: "how-to-get-the-daily-cost-report-for-deployments" updated: 2026-06-15T20:24:14Z published: 2026-06-15T20:24:14Z canonical: "resources.realtheory.io/how-to-get-the-daily-cost-report-for-deployments" --- > ## 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. # How To: Get the Daily Cost Report for Deployments After deploying the RealTheory collector to a Kubernetes cluster (See [Installing RealTheory in a Cluster](/v1/docs/installing-realtheory-in-a-cluster)), the cluster and its associated objects become available in the RealTheory API within minutes. ### Get Daily Cost Report To get the Daily Cost report data for all deployments for a given cluster, call the method below on the [K8sReports](https://api-dev.realtheory.io/swagger/k8sreports/index.html) endpoint. ``` GET /theory/api/v1/k8sreports/dailycostreport/deployments/search/query/{query}/{offset}/{span}?index={index}&count={count}&order={order}&direction={direction} ``` where - `{endpoint}` - is the URL of the RealTheory SaaS portal for your account. - `{query}` - is a [query](/v1/docs/queries) used to limit the results to deployments for a given cluster. - `{offset}` - is an offset from the current time, in a human readable format, that represents the start of the report data. Supported examples include '24h', '7d', '31d', '365d' - `{span}` - a span of time, in a human readable format, to include in the report data. Supported examples include '24h', '7d', '31d', '365d' - `{index}` - is the starting index of the rows to include in the list. This parameter is optional and defaults to 0 if not specified. - `{count}` - is the maximum number of rows to return, up to a limit of 500. This parameter is optional and defaults to 100 if not specified. - `{order}` - is a string containing the name of the attribute to sort on. This parameter is optional. Default value is totalCost. - `{direction}` - is a number that controls the direction of the sort. A value equal to or greater than 0 indicates ascending order; a value less than 0 indicates descending order. This parameter is optional and defaults to -1 if not specified. **Note:** - All calls to RealTheory APIs must be authenticated and authorized. See [Authentication](/v1/docs/authentication) for more details. - To retrieve all rows, increment the `{index}` by the `{count}` on each subsequent call until a response returns fewer rows than the `{count}` requested. See [Paging](/v1/docs/paging) for more details on how to page through all results. #### Example ``` GET myendpoint.realtheory.io/theory/api/v1/k8sreports/dailycostreport/deployments/search/query/metadata.name=my-deployment/31d/31d?index=0&count=50&order=totalCost&direction=-1 ``` which returns the first 50 rows for the Daily Cost report for the last 31 days, listing only the deployments named `my-deployment`, sorted by deployments with the highest total cost to the lowest total cost. #### Output Returns an array of [DeploymentItem](/v1/docs/k8sreportsdailycostdeploymentitem) objects. ``` [ { "id": "59f005f9-8e36-4e4e-a346-c140c6341838", "metadata": { "id": "59f005f9-8e36-4e4e-a346-c140c6341838", "name": "my-deployment", "clusterId": "8ca6aa4c-8c7d-9fb9-c751-3e038f90d283", "clusterName": "realtheory-cluster-01", "customResourceDefinitionId": "00000000-0000-0000-0000-000000000000", "customResourceDefinitionName": "", "namespaceId": "d61ccb51-0c9e-40b7-9730-4db1223ab3c6", "namespaceName": "realtheory-example", "customResourceId": "00000000-0000-0000-0000-000000000000", "customResourceName": "", "timestamp": "2024-03-08T00:30:27.1391919Z" }, "totalCost": 9.97616063, "costs": [ { "total": 0.33017443, "cpuUtilization": 3.0416667, "memoryUtilization": 77.93017, "utilization": 40.485832, "efficiency": 12.0275, "timestamp": "2024-02-06T00:00:00Z" }, { "total": 0.31641716, "cpuUtilization": 3.0434783, "memoryUtilization": 81.07564, "utilization": 42.06, "efficiency": 12.406957, "timestamp": "2024-02-07T00:00:00Z" }, { "total": 0.31643172, "cpuUtilization": 3.0289855, "memoryUtilization": 81.49785, "utilization": 42.263042, "efficiency": 12.444782, "timestamp": "2024-02-08T00:00:00Z" }, ... ], "clusterName": "realtheory-cluster-01", "namespaceName": "realtheory-example", "deploymentName": "my-deployment", "accountName": "RealTheory,Inc.", "accountOwner": "Joe.Bloggs" }, ... ] ``` **Note:** Content has been omitted from the JSON response above for brevity.