---
title: "Count clusters by lifecycle state"
method: GET
path: "/clusters/_stats"
tags: ["Clusters"]
---

# Count clusters by lifecycle state

`GET /clusters/_stats`

## 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/_stats`
- Auth: one of:
  - HTTP basic
  - API key in cookie `Auth-Graviteeio-APIM`

Returns the total number of clusters and the count per lifecycle state (Deployed / Pending /
Undeployed) for the environment, optionally scoped to a cluster type — the numbers behind the
console cluster stat-strip. User must have the ENVIRONMENT_CLUSTER[READ] permission.

## Query parameters

- `type` 'KAFKA_CLUSTER_STANDALONE' | 'KAFKA_CLUSTER' | 'KAFKA_VIRTUAL_CLUSTER'

## Response `200`

Cluster counts by lifecycle state

- ClusterLifecycleStateStats: Cluster counts by lifecycle state for the environment (optionally scoped to a type).
  - `total` integer: Total number of clusters.
  - `deployed` integer: Number of clusters in the DEPLOYED state.
  - `pending` integer: Number of clusters in the PENDING state.
  - `undeployed` integer: Number of clusters in the UNDEPLOYED state.

## Other responses

- `default`: Generic error response

## Changes

- **2026-07-30** `fc21ae658d19`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments/changes/clusters/_stats/get.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)
