---
title: "Update a cluster"
method: PUT
path: "/clusters/{clusterId}"
tags: ["Clusters"]
---

# Update a cluster

`PUT /clusters/{clusterId}`

## Request

- Base URL: `/management/v2/environments/DEFAULT` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/management/v2/environments/DEFAULT/clusters/{clusterId}`
- Auth: one of:
  - HTTP basic
  - API key in cookie `Auth-Graviteeio-APIM`

User must have the CLUSTER_DEFINITION[UPDATE] permission.

Kafka virtual cluster lifecycle: removing all backends is a plain edit. On a deployed
virtual cluster the update is accepted (200) and the cluster moves to `lifecycleState`
`PENDING`: the gateway keeps serving the previous configuration, and the emptied
configuration cannot be deployed until at least one backend is added back (the deploy
endpoint rejects virtual clusters without backends).

## Request body

- UpdateCluster
  - `name` string
  - `description` string
  - `configuration` object

## Response `200`

Cluster updated

- Cluster
  - `id` string
  - `crossId` string: Portable identifier for cross-environment references. Immutable after creation.
  - `type` 'KAFKA_CLUSTER_STANDALONE' | 'KAFKA_CLUSTER' | 'KAFKA_VIRTUAL_CLUSTER'
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `name` string
  - `description` string
  - `configuration` object
  - `groups` string[]
  - `lifecycleState` 'UNDEPLOYED' | 'DEPLOYED' | 'PENDING': Current lifecycle state of the cluster.
  - `deployedAt` string, date-time: Last deployment or undeployment timestamp.
  - `version` integer: Deployment version, incremented on each deploy.

## Other responses

- `default`: Generic error response

## Changes

- **2026-04-22** `ac9b3975b952`: 1 warning
  - added the new `KAFKA_VIRTUAL_CLUSTER` enum value to the `type` response property for the response status `200`
- **2026-04-22** `86ed32989ff4`: 1 warning, 1 info
  - added the new `KAFKA_CLUSTER_STANDALONE` enum value to the `type` response property for the response status `200`
  - removed the `KAFKA_CLUSTER_CONNECTION` enum value from the `type` response property for the response status `200`
- **2026-04-20** `00b565da0a78`: 3 info
  - added the optional property `deployedAt` to the response with the `200` status
  - added the optional property `lifecycleState` to the response with the `200` status
  - added the optional property `version` to the response with the `200` status
- **2026-04-15** `576375ea01b9`: 1 info
  - added the optional property `crossId` to the response with the `200` status
- **2026-04-10** `775a25fac9b4`: 1 warning
  - added the new `KAFKA_CLUSTER` enum value to the `type` response property for the response status `200`

[Operation history](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments/changes/clusters/:clusterId/put.md)

---

[API](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments.md) - [All operations](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments/llms.txt) - [OpenAPI document](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments/revisions/b736a7e375df?raw)
