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

# Update a cluster

> Change cluster settings such as the query timeout or the autoscaling range.

`PUT /api/v1/queryservices/{name}`

Change cluster settings such as the query timeout or the autoscaling range.

## Access

[Request a workspace OAuth token](https://docs.e6data.com/api-reference/workspace-oauth-2-0/post-oauth2-token.md#request) for the workspace that owns the resource. If your workspace uses OAuth scopes for API access, request `query_engine.clusters:update`. If your admin confirms that workspace permissions are active for management API calls, omit the `scope` field for this call.

## Request

Path: name. Body: specify the setting to change. queryTimeoutSeconds is in seconds.

Content type: `application/json`.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "queryTimeoutSeconds": 900
}
```

### Body fields

| Field | Type | Input | Details |
| - | - | - | - |
| `autoResumeEnabled` | boolean | Optional | Enable automatic resume on first query when cluster is suspended. Default: true. |
| `autoResumeTimeoutSeconds` | integer | Optional | Readiness wait for the next auto-resume attempt. Range 30-600 seconds. Defaults to 300 on create. Omission on update preserves the current value. Minimum: 30. Maximum: 600. |
| `autoSuspensionEnabled` | boolean | Optional | Allow the cluster to suspend after its configured idle interval. |
| `autoscalingEnabled` | boolean | Optional | Enable automatic scaling of executor replicas. |
| `baseSizeExecutors` | integer | Optional | Starting executor count for the cluster size you select. This is separate from the autoscaling minimum and maximum. Minimum: 1. |
| `configVersion` | string | Optional | ConfigVersion is the detail response's configVersion the update was made from. When sent and the cluster's settings have changed since, the update is refused with 409 (reason changed\_since\_loaded) instead of overwriting that change. |
| `executorReplicas` | integer | Optional | Starting executor count. Must be zero or greater. For new clusters, use baseSizeExecutors. |
| `maxExecutors` | integer | Optional | Maximum executor replicas when autoscaling is enabled. Minimum: 0. |
| `maxIdleDurationMinutes` | integer | Optional | Minutes of inactivity before auto-suspension. Minimum: 0. |
| `minExecutors` | integer | Optional | Minimum executor replicas when autoscaling is enabled. Left out when turning autoscaling on, the stored minimum and the running count are kept. Minimum: 0. |
| `plannerReplicas` | integer | Optional | Planner count. Must be zero or greater. Automatic sizing can override this value. |
| `qps` | object | Optional | QPS configuration for dynamic planner scaling |
| `qps.count` | integer | Optional | Target queries per second. Maximum: 10000. |
| `qps.enabled` | boolean | Optional | Enable QPS-based planner scaling. When true, planner count is calculated from QPS formula. |
| `queryHistoryEnabled` | boolean | Optional | Save query history so users with access can find their runs in Run History. |
| `queryResultCacheEnabled` | boolean | Optional | Enable query result caching. When enabled, query results are cached to improve performance for repeated queries. |
| `queryResultCacheTTLSeconds` | integer | Optional | Time-to-live for cached query results in seconds. Default: 300 (5 minutes). Needs queryResultCacheEnabled: true in the same request (400 otherwise). Minimum: 0. |
| `queryTimeoutSeconds` | integer | Optional | Maximum query execution time in seconds. Minimum: 0. Maximum: 172800. |
| `releaseRef` | string | Optional | Version to use for the cluster. Choose a version available in your workspace. |
| `slidingWindowDuration` | integer | Optional | Length of the autoscaling observation window in minutes. Minimum: 0. Maximum: 35791394. |
| `startupGracePeriodSeconds` | integer | Optional | StartupGracePeriodSeconds applies after startup capacity is ready on the next startup. Omitted uses 300 seconds; zero disables future startup protection. Minimum: 0. |
| `transpilerDialect` | string | Optional | SQL dialect to transpile from (e.g., "snowflake", "trino", "databricks"). Optional, default snowflake. Needs transpilerEnabled: true in the same request (400 otherwise). |
| `transpilerEnabled` | boolean | Optional | Enable translation from the selected SQL dialect. |
| `windowBasedEnabled` | boolean | Optional | Enable window-based autoscaling. |

### Example request

Save the JSON request above as `request.json`.
Set `WORKSPACE_URL` to the same HTTPS workspace origin and `ACCESS_TOKEN` to the access token from that workspace. Replace example names and IDs with values from your workspace.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --proto '=https' --silent --show-error --fail-with-body \
  --request PUT \
  --header @- \
  --header 'Content-Type: application/json' \
  --data-binary @request.json \
  "$WORKSPACE_URL/api/v1/queryservices/reporting" <<< "Authorization: Bearer $ACCESS_TOKEN"
```

## Response

HTTP `200`. Content type: `application/json`.

Example response (selected fields and sample values):

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "message": "<message from your workspace>",
  "name": "reporting"
}
```

The `message` field contains text from your workspace. The example uses a placeholder for that text.

Capacity changes can also return replicaChanges. If the response contains a warning, review it before assuming a change was applied.

## Troubleshooting

For `401`, check the workspace URL and token expiry. For `403`, ask your admin to check the machine client’s access to this operation and resource. In a scope-based workspace, also check the scope on the token. [Troubleshoot the token or request](https://docs.e6data.com/api-reference/list-clusters-with-oauth.md#troubleshoot-a-request).

## Related guides

[Workspace management guide](https://docs.e6data.com/platform/automate/clusters-catalogs-schedules-policies.md)


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