---
title: "Toggle Auto Tune for an all-purpose cluster (master or sub-toggle)"
method: PATCH
path: "/api/v1/databricks/clusters/{cluster_id}/auto-tune/toggle"
tags: ["DATABRICKS", "Databricks", "Databricks Clusters"]
deprecated: true
---

# Toggle Auto Tune for an all-purpose cluster (master or sub-toggle)

`PATCH /api/v1/databricks/clusters/{cluster_id}/auto-tune/toggle`

> **Deprecated.**

Enable/disable Auto Tune for the cluster. ``rec_type=None`` is the
master toggle (flips both sub-toggles). Records config + audit only;
no Databricks edit. On enable, the cluster permission preflight runs
first and blocks the write if the SP can't manage the cluster.

## Path parameters

- `cluster_id` string, required

## Query parameters

- `instance_id` integer, required — Tenant instance ID (workspace)
- `workspace_id` string, nullable — Optional Databricks workspace_id to scope the lookup.
- `navigationSource` string, nullable

## Headers

- `x-tenant` string, required

## Request body

- ClusterAutoTuneToggleRequest — Request body for ``PATCH /databricks/clusters/{id}/auto-tune/toggle``. ``rec_type=None`` is the master toggle — it flips BOTH sub-toggles (``resize`` + ``auto_terminate``) to ``enabled``. A specific ``rec_type`` flips only that sub-toggle. Nothing is applied to Databricks; the call records the config change + an audit event.
  - `enabled` boolean, required — Desired state for the toggle.
  - `rec_type` 'resize' | 'auto_terminate', nullable — Which sub-toggle to flip. None = master toggle (flips both Worker Sizing and Auto Termination).

## Response `200`

Successful Response

- ClusterAutoTuneToggleResponse — Response for the cluster Auto Tune toggle endpoint. Returns the resolved master ``auto_tune_mode`` so the FE can re-render the header pill without a second round-trip.
  - `auto_tune_mode` string, nullable
  - `audit_event_id` integer, nullable
  - `entity_name` string, nullable
  - `preflight` ToggleAutoTunePreflight — Surfaced to the FE so it can render an actionable error inline. When ``blocked=False`` the toggle pipeline ran. When ``blocked=True`` no DB writes happened and ``actionable_message`` should be shown to the user verbatim (e.g. "ask your workspace admin to add r5.xlarge to the policy allowlist").
    - `blocked` boolean
    - `reason` string, nullable
    - `actionable_message` string, nullable
  - `rolled_back_rec_types` string[]

## Other responses

- `403` — Not authorized
- `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/50769cbf05d5/schema)
