v5

latestOpenAPI 3.1.02026-08-081,0211,3082.1 MB
DATABRICKS
Databricks
Databricks Jobs

Toggle auto-tune on/off for a job's recommendation

Enable or disable auto-tune for a recommendation.

Three flows behind one endpoint (v2.5 §15):

  1. Enable — write APPLY_REQUESTED + flip config to enabled. Worker picks up async and calls Databricks.
  2. Disable when never applied — fast-path. Write APPLY_REQUESTED (mode=disable) + flip the per-role cfg rows to disabled. No Databricks call needed.
  3. Disable when previously APPLIED — sync rollback. BE preflight → optionally cancel active runs (with force=true) → POST /api/2.2/jobs/update with attributes.from of the most recent APPLIED → write APPLIED audit row + update config in one Postgres tx. On Databricks failure: NO audit row, surface error.
patch/api/v1/databricks/jobs/{job_id}/auto-tune/toggle

Path parameters

job_idstring required

Query parameters

instance_idinteger required

Tenant instance ID (workspace) the job runs in

Tenant instance ID (workspace) the job runs in

workspace_idstring nullable

Optional Databricks workspace_id to scope queries to a specific workspace within the tenant's Databricks account. Defends against cross-workspace job_id collisions. When None, falls back to (instance_id, entity_id) lookup.

Optional Databricks workspace_id to scope queries to a specific workspace within the tenant's Databricks account. Defends against cross-workspace job_id collisions. When None, falls back to (instance_id, entity_id) lookup.

task_keystring

Task key when toggling a per-task recommendation. Empty string for job-level recommendations (default).

Task key when toggling a per-task recommendation. Empty string for job-level recommendations (default).

forceboolean

Only meaningful for sync rollback (disable on an applied rec). When the job has active runs, force=true cancels them before reverting the cluster config. Defaults to false; the BE returns rollback.needs_confirmation=true and the FE shows an interstitial.

Only meaningful for sync rollback (disable on an applied rec). When the job has active runs, force=true cancels them before reverting the cluster config. Defaults to false; the BE returns rollback.needs_confirmation=true and the FE shows an interstitial.

navigationSourcestring nullable

Headers

x-tenantstring required

Request body

enabledboolean required

Desired auto-tune state for the recommendation.

scope'all_tasks' | 'specific_tasks' nullable

Optional whole-job cascade. 'all_tasks' cascade-writes the toggle to every (entity_id, task_key) row under this job. 'specific_tasks' enables the recs whose task_key appears in enabled_task_keys and DISABLES every other rec on the job — the config row converges to the exact set the user chose. When omitted, the toggle behaves per-task (legacy behavior — only the (job_id, task_key) row from the URL/query is mutated).

enabled_task_keysstring[] nullable

Required (and must be non-empty) when scope='specific_tasks'. Rejected for any other scope. The list of task_keys the user has chosen to enable; every other rec on the job is disabled.

Response

Successful Response

auto_tune_modestring nullable
audit_event_idinteger nullable
entity_namestring nullable