List clusters

Returns the argocd ClusterList of the destinations the caller's applications reconcile into: one entry per distinct destination server, carrying the count of applications reconciling into it.

GET /v1/deploy/clusters

Addresshttps://api.hanzo.ai/v1/deploy/clusters
MethodGET
Operationget_deploy_clusters
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the argocd ClusterList of the destinations the caller's applications reconcile into: one entry per distinct destination server, carrying the count of applications reconciling into it. The in-cluster destination is always present, so an empty fleet still answers one cluster, and no cluster credential can appear — the projected type physically has no config field.

It is TENANT-SCOPED and reads the SAME App CRs the applications list reads: a platform SuperAdmin counts the whole fleet, a validated org member counts only its own org's applications, anyone else is refused.

Request

GET /v1/deploy/clusters takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200deploy.argoClusterListok
defaultproblem-detailsrefused

200 body — 16 fields.

FieldInTypeAlwaysDescription
itemsbodydeploy.argoCluster[]—Items is one entry per distinct destination server, in first-seen order with the in-cluster destination first.
items[].connectionStatebodydeploy.argoConnectionState—
items[].connectionState.attemptedAtbodystring—AttemptedAt is when the connection was last probed.
items[].connectionState.messagebodystring—Message is why a connection failed.
items[].connectionState.statusbodystring—Status is ArgoCD's ConnectionStatus — Successful, Failed or Unknown.
items[].infobodydeploy.argoClusterInfo—
items[].info.applicationsCountbodyinteger (int64)—ApplicationsCount is how many of THE CALLER'S applications reconcile into this cluster, so a tenant sees its own count and a SuperAdmin the fleet's.
items[].info.connectionStatebodydeploy.argoConnectionState—
items[].info.connectionState.attemptedAtbodystring—AttemptedAt is when the connection was last probed.
items[].info.connectionState.messagebodystring—Message is why a connection failed.
items[].info.connectionState.statusbodystring—Status is ArgoCD's ConnectionStatus — Successful, Failed or Unknown.
items[].info.serverVersionbodystring—ServerVersion is the kubernetes version of the destination.
items[].namebodystring—Name is what the Destination column shows: "in-cluster" for this cluster, otherwise whatever spec.destination.name declares, falling back to the server URL when it declares none.
items[].serverbodystring—Server is the destination's API URL, and the key the list is deduplicated by.
metadatabodydeploy.argoListMeta—
metadata.resourceVersionbodystring—ResourceVersion is the k8s list version a watch would resume from.

Failure carries the platform error shape — see Errors.

Examples

hanzo deploy clusters
import { Configuration, DeployApi } from 'hanzoai';

const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDeployClusters();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DeployApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DeployApi(client).get_deploy_clusters()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DeployAPI.GetDeployClusters(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, deploy_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = deploy_api::get_deploy_clusters(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DeployApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new DeployApi(client).getDeployClusters();
curl https://api.hanzo.ai/v1/deploy/clusters \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches deploy through the deploy tool, which names its 11 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_deploy_applications"
         }
       }
     }'

Deploy API · All Hanzo APIs · Interactive reference

Was this page useful?