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

# Count clusters by lifecycle state

`GET /clusters/_stats`

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

---

[API](https://skmtc.net/gravitee-io/apis/gravitee-io-apim-management-api-environments.md) · [All operations](https://skmtc.net/gravitee-io/apis/gravitee-io-apim-management-api-environments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gravitee-io/gravitee-io-apim-management-api-environments/revisions/37e8cbe5f769/schema)
