--- title: "How To: Get the Lost Dollars Report for Namespaces" slug: "how-to-get-the-lost-dollars-report-for-namespaces" updated: 2026-06-15T20:23:22Z published: 2026-06-15T20:23:22Z canonical: "resources.realtheory.io/how-to-get-the-lost-dollars-report-for-namespaces" --- > ## 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 Lost Dollars Report for Namespaces 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 Lost Dollars Report To get the Lost Dollars report data for all namespace 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/lostdollarsreport/namespaces/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 namespaces 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/lostdollarsreport/namespaces/search/query/metadata.clusterName=realtheory-cluster-01/31d/31d?index=0&count=100&order=lostDollars&direction=-1 ``` which returns the first 100 the rows for the Lost Dollars report for the last 31 days, listing only the namespaces associated with `realtheory-cluster-01` cluster, sorted by namespaces with the highest lost dollars to the lowest lost dollars. #### Output Returns an array of [NamespaceItem](/v1/docs/k8sreportslostdollarsnamespaceitem) objects. ``` [ { "id": "53214960-fda3-4089-9e12-a7f476317352", "metadata": { "id": "53214960-fda3-4089-9e12-a7f476317352", "name": "realtheory-example", "clusterId": "04fee66e-0078-4ed2-b1f1-0c234557fca3", "clusterName": "realtheory-cluster-01", "timestamp": "2024-03-08T00:59:11.6810368Z" }, "lostDollars": 328.03961661, "lostDollarsPercentage": 76.46, "allocatedDollars": 429.04954461, "utilization": 42.6, "clusterName": "realtheory-cluster-01", "namespaceName": "realtheory-example", "accountName": "RealTheory,Inc.", "accountOwner": "Joe.Bloggs" }, { "id": "fbd7035e-0d5e-41c1-9a72-6a841dc5053a", "metadata": { "id": "fbd7035e-0d5e-41c1-9a72-6a841dc5053a", "name": "kube-system", "clusterId": "04fee66e-0078-4ed2-b1f1-0c234557fca3", "clusterName": "realtheory-cluster-01", "timestamp": "2024-03-08T00:59:44.4942969Z" }, "lostDollars": 68.17212907, "lostDollarsPercentage": 87.83, "allocatedDollars": 77.61569903, "utilization": 53.3, "clusterName": "realtheory-cluster-01", "namespaceName": "kube-system", "accountName": "RealTheory,Inc.", "accountOwner": "Joe.Bloggs" }, ... ] ``` **Note:** Content has been omitted from the JSON response above for brevity.