---
title: "Get cost comparison between periods"
method: GET
path: "/api/v1/databricks/cost/comparison"
tags: ["DATABRICKS", "Databricks", "Databricks Cost"]
---

# Get cost comparison between periods

`GET /api/v1/databricks/cost/comparison`

Get cost comparison between current and previous period.

Automatically calculates the previous period based on the duration of the current period.

## Query parameters

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

## Headers

- `x-tenant` string, required

## Response `200`

Successful Response

- CostComparisonResponse — Response model for period comparison.
  - `current_period_dbus` number, required — DBUs in current period
  - `previous_period_dbus` number, required — DBUs in previous period
  - `current_period_cost` number, required — Cost in current period
  - `previous_period_cost` number, required — Cost in previous period
  - `delta_dbus` number, required — Change in DBUs
  - `delta_cost` number, required — Change in cost
  - `delta_pct` number, nullable — Percentage change

## 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/versions/aab3fe5c9f05/schema)
