---
title: "Get total auto-tune savings across SQL warehouses"
method: GET
path: "/api/v1/databricks/warehouses/total-savings"
tags: ["DATABRICKS", "Databricks", "Databricks Warehouses"]
---

# Get total auto-tune savings across SQL warehouses

`GET /api/v1/databricks/warehouses/total-savings`

Get the SQL warehouses list page's "Total Savings" cards — Realised
Savings, Estimated Annual Savings, and Total Opportunities.

Declared before `/{warehouse_id}` so FastAPI's declaration-order route
matching doesn't swallow this path as a warehouse_id lookup.

Note: unlike the warehouses list, this aggregate only supports a single
``workspace_id`` — ``get_warehouse_savings_totals_by_type`` (the
underlying repo method, shared with ``DatabricksSavingsService``'s
other overall-savings endpoints) takes one workspace, not a list.

## Query parameters

- `start_date` string, date, required — Start date
- `end_date` string, date — End date
- `workspace_id` string, nullable — Filter by workspace ID
- `navigationSource` string, nullable

## Headers

- `x-tenant` string, required

## Response `200`

Successful Response

- WarehousesTotalSavingsResponse — Response for the SQL warehouses list page's "Total Savings" section — the Databricks counterpart to Snowflake's warehouse cost summary cards (Realised Savings / Estimated Annual Savings / Total Opportunities).
  - `realised_savings` SavingsStatValue, required — A single stat-card value with a display-gate flag. Mirrors the Snowflake infra page's ``top_info`` item shape (``TopInfoItem`` in ``app/schemas/summary_page.py``) so the FE's existing stat-card component logic ports over unchanged: ``display`` lets a backend that can't cleanly compute a figure hide the card instead of showing a misleading 0.
    - `value` number
    - `display` boolean
  - `estimated_annual_savings` SavingsStatValue, required — A single stat-card value with a display-gate flag. Mirrors the Snowflake infra page's ``top_info`` item shape (``TopInfoItem`` in ``app/schemas/summary_page.py``) so the FE's existing stat-card component logic ports over unchanged: ``display`` lets a backend that can't cleanly compute a figure hide the card instead of showing a misleading 0.
    - `value` number
    - `display` boolean
  - `total_opportunities` SavingsStatValue, required — A single stat-card value with a display-gate flag. Mirrors the Snowflake infra page's ``top_info`` item shape (``TopInfoItem`` in ``app/schemas/summary_page.py``) so the FE's existing stat-card component logic ports over unchanged: ``display`` lets a backend that can't cleanly compute a figure hide the card instead of showing a misleading 0.
    - `value` number
    - `display` boolean

## Other responses

- `403` — Not authorized
- `404` — No ClickHouse database configured
- `422` — Validation Error

---

[API](https://skmtc.net/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.net/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myaltimate/fastapi/revisions/aab3fe5c9f05/schema)
