> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.select.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Turn automated savings on or off for Databricks all-purpose clusters

> Apply the same automated savings settings to a batch of all-purpose clusters.

Each item is checked on its own. `items` contains the updated clusters with
their new settings, and `failures` contains the rejected items. Both are in
request order. A rejected item does not stop the other items. An item is
rejected with `not_found` when its workspace or its cluster does not exist.



## OpenAPI

````yaml https://api.select.dev/v2/openapi.json post /databricks-apc-clusters/actions/batch-update-automated-savings
openapi: 3.1.0
info:
  title: SELECT API (v2)
  version: 0.1.0
servers:
  - url: https://api.select.dev/v2
    description: SELECT API v2
security: []
tags:
  - name: metrics
    description: >-
      Query cost and usage data across Snowflake, BigQuery, Databricks and
      Tableau. Each route is `POST /v2/metrics/<model>/query` for one semantic
      model. Every route takes the same body shape and returns the same response
      shape. Each route page gives guidance on when to use the route, and worked
      examples.


      ## Body shape


      | Field | Meaning |

      | --- | --- |

      | `measures` | Aggregates to compute, for example `sum_spend`. |

      | `dimensions` | Fields to group by. Each one is returned on every row. |

      | `filter_expression` | An `and`/`or` tree of filters on dimensions,
      applied before aggregation. |

      | `measure_filters` | Filters on measures, applied after aggregation. |

      | `sort` | The order of the rows: `[{"field": "sum_spend", "direction":
      "desc"}]`. |

      | `limit` | The maximum number of rows. Results are not paginated: `limit`
      cuts the result short, and there is no next page. Omit `limit` to get all
      rows. |

      | `aggregate` | Set `false` to list the rows with no grouping. See
      "Listing rows". |


      v2 accepts only `filter_expression`. The body refuses the legacy `filters`
      list.


      ## Filter on dates


      Filter on the `day` field. Use two filters (both bounds are inclusive):


      ```json

      {"operator": "and", "filters": [
        {"field": "day", "operator": ">=", "value": "2026-08-01"},
        {"field": "day", "operator": "<=", "value": "2026-08-31"}], "limit": 1000}
      ```


      Or use one relative filter: `{"field": "day", "operator": "in range",
      "value": "30D"}`. The values are `{N}D` and `{N}M` (the last N days or
      months, today included), `WTD`, `MTD`, `QTD`, `YTD`, and `LMTD` (the whole
      previous calendar month).


      - Do not filter on `hour`, `week`, `month` or `quarter` to bound a range.
      Filter on `day`, and use the coarser fields as dimensions.

      - A timestamp such as `start_time <= "2026-08-31"` compares to midnight
      and drops most of that day. Use `day`, or `start_time < "2026-09-01"`.

      - A snapshot route (for example `snowflake-storage-summary`) describes the
      current state, and a `day` filter does not bound its size and cost fields.
      On routes that join the snapshot to activity, `day` bounds only the
      activity fields. Each route page says which fields these are.


      ## Which measure is cost


      - `sum_spend` (or `spend`, or `cost` on some routes) is the dollar cost in
      the filtered period. Use it for "how much did we spend".

      - `*_annualized` measures extend the spend of the filtered period to a
      year: a `7D` range gives that week's spend times 365 / 7. They are
      projections, not spend.

      - On snapshot routes, `annual_cost`, `*_monthly_cost` and `*_annual_cost`
      are the current rate extended to a month or a year. A date range does not
      bound them.

      - Do not present any of these run-rates as spend in a period.

      - Databricks routes also give DBUs (for example `sum_task_usage`). DBUs
      are not dollars.


      The `spend` route is the consolidated cost of every platform. Use it for
      totals, trends and breakdowns by service. Use a platform route to explain
      what inside the platform caused the cost.


      ## Text values are case-sensitive


      Filter values must match the stored case. A value in the wrong case
      matches no rows, with no error. For example:


      - On `spend`, `connection_type` is `Snowflake`, `Bigquery` or
      `Databricks`, and `"snowflake"` matches nothing.

      - On `search`, `data-freshness` and `workload-metadata-suggestions`,
      `connection_type` is lowercase: `snowflake`, `bigquery`, `databricks`.

      - On `snowflake-workloads`, most `resource_type` values are lowercase keys
      (`query_pattern`, `dbt`), but the AI types are title case (`Cortex
      Analyst`).


      ## Usage groups


      A usage group set divides cost into named groups, such as departments or
      teams. To group by the groups of one set, name the set in `path`:


      ```json

      {"dimensions": [{"field": "usage_group", "path": ["Department"]}],
      "limit": 1000}

      ```


      `path[0]` is the name of the set, not its ID. A plain `"usage_group"`
      dimension groups by every set at once. The same `{"field": ..., "path":
      [...]}` form reads keys of other semi-structured fields, for example
      workload metadata.


      ## Period over period


      Some routes publish `<measure>_previous_period`, `change_<measure>` and
      `percent_change_<measure>`. These measures need one bounded date range on
      `day`, at the top level of `filter_expression`:


      - Use two bounds on `day`, or one `in range` filter. Do not mix the two
      forms.

      - Do not nest the date filter in a sub-expression, and do not bound the
      range with `month` or `quarter`.

      - The previous period is the same number of days, just before the range.
      For `QTD` on 2026-09-28 (2026-07-01 to 2026-09-28, 90 days), the previous
      period is 2026-04-02 to 2026-06-30, not the previous calendar quarter.


      ## Listing rows


      Set `"aggregate": false` and name only `dimensions` to get the rows as
      they are, for example the individual queries that ran longer than ten
      minutes. If the body also names `measures` or `measure_filters`, the route
      aggregates, with no error. Always set a `limit` on a listing.


      ## Default scoping filters


      Some tables hold more than one kind of row, and the SELECT app filters to
      one kind by default. Each route page names these filters. For example:


      - `snowflake-query-patterns`: `{"field": "resource_type", "operator":
      "in", "values": ["query_pattern"]}`. `bigquery-query-patterns` filters
      `workload_type` to `bigquery_query_pattern`, and
      `databricks-query-patterns` filters `resource_type` to
      `databricks_query_pattern`.

      - `snowflake-dbt`: `{"field": "dbt_node_resource_type", "operator": "=",
      "value": "model"}`. Without it, tests, seeds and snapshots rank with
      models. The same filter applies to `bigquery-dbt-queries` and
      `databricks-dbt-queries`.


      ## Teams


      Send `X-Team-Id` to evaluate a query as a team you belong to. The rows are
      then limited to what the team's roles can reach.


      ## Which route answers which question


      | Question | Route |

      | --- | --- |

      | Total spend, spend trend, spend by platform, service or usage group |
      `spend` |

      | Most expensive Snowflake warehouses | `snowflake-workloads` (or
      `snowflake-warehouses` for metering spend) |

      | Warehouse utilization, idle spend, cluster usage |
      `snowflake-warehouses`, `snowflake-warehouse-clusters` |

      | Query latency, spillage and bytes scanned on a warehouse |
      `snowflake-warehouse-query-performance` |

      | Most expensive recurring queries | `snowflake-query-patterns` |

      | Individual queries | `snowflake-queries` |

      | Cost of dbt models, and of dbt runs | `snowflake-dbt`,
      `snowflake-dbt-invocations` |

      | Cost of tasks, stored procedures, dynamic tables | `snowflake-tasks`,
      `snowflake-stored-procedures`, `snowflake-dynamic-tables` |

      | Cost of BI tools (Looker, Mode, Hex, Sigma, Periscope, Tableau) |
      `snowflake-looker`, `snowflake-mode`, `snowflake-hex`, `snowflake-sigma`,
      `snowflake-periscope`, `tableau-queries` |

      | Cost of Fivetran, and of workloads defined by query tags |
      `snowflake-fivetran`, `snowflake-custom-workloads` |

      | Serverless, automatic clustering and Snowpipe cost |
      `snowflake-serverless`, `snowflake-automatic-clustering`,
      `snowflake-snowpipe` |

      | Storage cost in a period | `snowflake-storage`, `bigquery-storage-spend`
      |

      | Largest or unused tables now | `snowflake-storage-summary`,
      `bigquery-storage-summary` |

      | Which workloads read or write a table | `lineage-workloads`,
      `lineage-tables`, `lineage-edges` |

      | BigQuery cost by project, job or query pattern | `bigquery-projects`,
      `bigquery-jobs`, `bigquery-query-patterns` |

      | BigQuery reservations and commitments | `bigquery-reservation-timeline`,
      `bigquery-commitments`, `bigquery-commitment-scopes` |

      | Databricks cost by job, query, SQL warehouse or cluster |
      `databricks-jobs`, `databricks-queries`, `databricks-sql-warehouses`,
      `databricks-clusters` |

      | Savings from SELECT actions | `action-realized-savings` |

      | How current the data is | `data-freshness` |
paths:
  /databricks-apc-clusters/actions/batch-update-automated-savings:
    post:
      tags:
        - automated-savings
      summary: Turn automated savings on or off for Databricks all-purpose clusters
      description: >-
        Apply the same automated savings settings to a batch of all-purpose
        clusters.


        Each item is checked on its own. `items` contains the updated clusters
        with

        their new settings, and `failures` contains the rejected items. Both are
        in

        request order. A rejected item does not stop the other items. An item is

        rejected with `not_found` when its workspace or its cluster does not
        exist.
      operationId: >-
        batch_update_databricks_apc_cluster_automated_savings_route_databricks_apc_clusters_actions_batch_update_automated_savings_post
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: string
            description: The organization ID the request is scoped to.
            title: X-Tenant-Id
          description: The organization ID the request is scoped to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/DatabricksApcClusterBatchUpdateAutomatedSavings
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BatchWriteResponse_DatabricksApcClusterV2_
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HTTPBearer: []
components:
  schemas:
    DatabricksApcClusterBatchUpdateAutomatedSavings:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DatabricksApcClusterBatchItem'
          type: array
          maxItems: 100
          minItems: 1
          title: Items
          description: The clusters to update. Each cluster gets the same settings.
        enabled:
          type: boolean
          title: Enabled
          description: >-
            True when the request leaves at least one automated savings feature
            on, false when it turns every feature off. The features themselves
            change only through `config`, so send a value that agrees with it.
        config:
          anyOf:
            - $ref: '#/components/schemas/DatabricksApcClusterConfigUpdate'
            - type: 'null'
          description: >-
            The features to change. Only the fields you send change. Set
            `auto_downscale` or `max_cluster_size_capping` to turn that feature
            on or off. Automated savings is on while at least one of the two is
            on. Omit to keep the current settings.
      additionalProperties: false
      type: object
      required:
        - items
        - enabled
      title: DatabricksApcClusterBatchUpdateAutomatedSavings
      description: Turn automated savings on or off for a batch of all-purpose clusters.
    BatchWriteResponse_DatabricksApcClusterV2_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DatabricksApcClusterV2'
          type: array
          title: Items
        page_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Token
          description: Opaque cursor for the next page; empty/absent on the last page.
        row_count:
          type: integer
          title: Row Count
          description: The number of applied entries.
        failures:
          items:
            $ref: '#/components/schemas/BatchItemFailure'
          type: array
          title: Failures
          description: >-
            The entries that were not applied, in request order. Empty when
            every entry was applied.
      type: object
      required:
        - items
        - row_count
        - failures
      title: BatchWriteResponse[DatabricksApcClusterV2]
    DatabricksApcClusterBatchItem:
      properties:
        cluster_id:
          type: string
          title: Cluster Id
          description: The cluster ID that Databricks assigns.
        databricks_workspace_id:
          type: string
          title: Databricks Workspace Id
          description: The Databricks workspace ID of the workspace the cluster is in.
      additionalProperties: false
      type: object
      required:
        - cluster_id
        - databricks_workspace_id
      title: DatabricksApcClusterBatchItem
      description: One all-purpose cluster to update.
    DatabricksApcClusterConfigUpdate:
      properties:
        auto_downscale:
          type: boolean
          title: Auto Downscale
          description: Turn Auto Downscale on or off. Omit to keep the current value.
          default: false
        max_cluster_size_capping:
          type: boolean
          title: Max Cluster Size Capping
          description: Turn Managed Scale-Up on or off. Omit to keep the current value.
          default: false
      additionalProperties: false
      type: object
      title: DatabricksApcClusterConfigUpdate
      description: The automated savings features to turn on or off for a cluster.
    DatabricksApcClusterV2:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier of the cluster record.
          readOnly: true
          x-terraform-computed: true
        cluster_id:
          type: string
          title: Cluster Id
          description: The cluster ID that Databricks assigns.
          readOnly: true
          x-terraform-computed: true
        cluster_name:
          type: string
          title: Cluster Name
          description: The name of the cluster, as Databricks reports it.
          readOnly: true
          x-terraform-computed: true
        dbx_conn_id:
          type: string
          format: uuid
          title: Dbx Conn Id
          description: >-
            Identifier of the Databricks connection that SELECT found this
            cluster through (see `GET
            /v2/databricks-connections/{databricks_connection_id}`).
          readOnly: true
          x-terraform-computed: true
        parent_workspace_id:
          type: string
          title: Parent Workspace Id
          description: The Databricks workspace ID of the workspace the cluster is in.
          readOnly: true
          x-terraform-computed: true
        connection_id:
          type: string
          format: uuid
          title: Connection Id
          description: >-
            Identifier of the SELECT connection that owns the Databricks
            connection (see `GET /v2/connections/{connection_id}`).
          readOnly: true
          x-terraform-computed: true
        organization_id:
          type: string
          title: Organization Id
          description: The SELECT organization that owns the cluster record.
          readOnly: true
          x-terraform-computed: true
        enabled:
          type: boolean
          title: Enabled
          description: >-
            True when automated savings is on for the cluster. Use the
            `enabled__eq` filter on the list to select clusters by this value.
          readOnly: true
          x-terraform-computed: true
        enabled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Enabled At
          description: >-
            When a user last turned on an automated savings feature for the
            cluster. Null when no feature was turned on, or when automated
            savings is off.
          readOnly: true
          x-terraform-computed: true
        disabled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Disabled At
          description: >-
            When a user last turned off every automated savings feature for the
            cluster. Null when automated savings is on or was never turned off.
          readOnly: true
          x-terraform-computed: true
        config:
          $ref: '#/components/schemas/DatabricksApcClusterConfig'
          description: >-
            The automated savings settings of the cluster. `auto_downscale` and
            `max_cluster_size_capping` are the two features.
          readOnly: true
          x-terraform-computed: true
        permission_level:
          anyOf:
            - type: string
              enum:
                - can_manage
                - can_restart
                - can_attach_to
            - type: 'null'
          title: Permission Level
          description: >-
            The permission level SELECT holds on the cluster in Databricks:
            `can_manage`, `can_restart` or `can_attach_to`. Null when SELECT has
            no access. To turn automated savings on, SELECT needs `can_manage`.
          readOnly: true
          x-terraform-computed: true
        resource_ineligibility_reason:
          anyOf:
            - type: string
              enum:
                - fixed_size
                - driver_only
            - type: 'null'
          title: Resource Ineligibility Reason
          description: >-
            Why the cluster cannot use automated savings. Null when the cluster
            is eligible. `fixed_size`: the cluster has a fixed number of
            workers. `driver_only`: the cluster has no workers.
          readOnly: true
          x-terraform-computed: true
        discovery_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Discovery Error
          description: >-
            The last error SELECT got when it discovered clusters in this
            workspace. Null when the last discovery succeeded. Always null in a
            batch update response.
          readOnly: true
          x-terraform-computed: true
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the cluster record last changed.
          readOnly: true
          x-terraform-computed: true
      type: object
      required:
        - id
        - cluster_id
        - cluster_name
        - dbx_conn_id
        - parent_workspace_id
        - connection_id
        - organization_id
        - enabled
        - enabled_at
        - disabled_at
        - config
        - permission_level
        - resource_ineligibility_reason
        - discovery_error
        - updated_at
      title: DatabricksApcCluster
      description: One Databricks all-purpose cluster, with its automated savings settings.
    BatchItemFailure:
      additionalProperties: true
      description: >-
        The Problem Details for one rejected entry of a batch write, plus its
        position.


        The members of the entry's code that are not in the shared shape, such
        as

        ``grant_sql``, stay on the entry, as they do on a whole-request problem.
        See §3

        (batch writes) of the standards doc.
      properties:
        type:
          default: about:blank
          title: Type
          type: string
        title:
          type: string
          title: Title
        status:
          title: Status
          type: integer
        detail:
          title: Detail
          type: string
        code:
          title: Code
          type: string
        retryable:
          title: Retryable
          type: boolean
        details:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Details
        index:
          description: The position of the rejected entry in the request items.
          title: Index
          type: integer
      required:
        - title
        - status
        - detail
        - code
        - retryable
        - index
      title: BatchItemFailure
      type: object
    ProblemDetail:
      additionalProperties: true
      description: >-
        RFC 9457-style error payload, served as ``application/problem+json``.


        ``code`` is the stable, machine-readable identifier — consumers branch
        on it,

        never on ``title``. ``type`` stays ``about:blank``: we keep no per-error

        documentation pages. There is no ``instance``/request-id member (we
        don't run

        access logs). See the flat error-code catalogue in §4 of the standards
        doc.
      properties:
        type:
          default: about:blank
          title: Type
          type: string
        title:
          type: string
          title: Title
        status:
          title: Status
          type: integer
        detail:
          title: Detail
          type: string
        code:
          title: Code
          type: string
        retryable:
          title: Retryable
          type: boolean
        details:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Details
      required:
        - title
        - status
        - detail
        - code
        - retryable
      title: ProblemDetail
      type: object
    DatabricksApcClusterConfig:
      properties:
        auto_downscale:
          type: boolean
          title: Auto Downscale
          default: false
        max_cluster_size_capping:
          type: boolean
          title: Max Cluster Size Capping
          default: false
        poll_interval:
          type: integer
          title: Poll Interval
          default: 30
        hard_max_workers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Hard Max Workers
        current_cap:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Cap
        min_workers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Workers
        original_max_workers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Original Max Workers
        last_committed_max_workers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Last Committed Max Workers
        pending_resize_confirmation:
          anyOf:
            - $ref: '#/components/schemas/DatabricksApcPendingResizeConfirmation'
            - type: 'null'
        cap_increment_strategy:
          type: string
          title: Cap Increment Strategy
          default: double
        cap_pressure_polls_required:
          type: integer
          title: Cap Pressure Polls Required
          default: 3
        cleanup_pending:
          type: boolean
          title: Cleanup Pending
          default: false
      type: object
      title: DatabricksApcClusterConfig
    DatabricksApcPendingResizeConfirmation:
      properties:
        target_max:
          type: integer
          title: Target Max
        revert_value:
          type: integer
          title: Revert Value
        attempts_left:
          type: integer
          title: Attempts Left
      type: object
      required:
        - target_max
        - revert_value
        - attempts_left
      title: DatabricksApcPendingResizeConfirmation
      description: >-
        A restore-direction resize awaiting next-poll confirmation. Persisted so
        a

        restart mid-confirmation still re-applies the restore instead of letting
        a

        provider revert be misread as a user override.
  responses:
    BadRequest:
      description: Bad request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        WWW-Authenticate:
          description: Authentication challenge for the requested resource.
          required: true
          schema:
            type: string
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    NotFound:
      description: Not found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    MethodNotAllowed:
      description: Method not allowed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Allow:
          description: HTTP methods supported by the requested resource.
          required: true
          schema:
            type: string
    RequestTimeout:
      description: Request Timeout
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Conflict:
      description: Conflict
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ValidationFailed:
      description: Validation failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    RateLimited:
      description: Rate limited
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
    InternalError:
      description: Internal error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
  securitySchemes:
    HTTPBearer:
      type: http
      description: Organization API key (sl_…).
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.