Returns the argocd ClusterList of the destinations the caller's applications…
Returns the argocd ClusterList of the destinations the caller's applications reconcile into: one entry per distinct destination server, carrying the count…
GET /v1/deploy/clusters
| Address | https://api.hanzo.ai/v1/deploy/clusters |
| Method | GET |
| Operation | get_deploy_clusters |
| Auth | Authorization: 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
| Status | Body | Meaning |
|---|---|---|
200 | argoClusterList | ok |
200 body — 16 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
items | body | argoCluster[] | — | Items is one entry per distinct destination server, in first-seen order with the in-cluster destination first. |
items[].connectionState | body | argoConnectionState | — | |
items[].connectionState.attemptedAt | body | string | — | AttemptedAt is when the connection was last probed. |
items[].connectionState.message | body | string | — | Message is why a connection failed. |
items[].connectionState.status | body | string | — | Status is ArgoCD's ConnectionStatus — Successful, Failed or Unknown. |
items[].info | body | argoClusterInfo | — | |
items[].info.applicationsCount | body | integer | — | 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.connectionState | body | argoConnectionState | — | |
items[].info.connectionState.attemptedAt | body | string | — | AttemptedAt is when the connection was last probed. |
items[].info.connectionState.message | body | string | — | Message is why a connection failed. |
items[].info.connectionState.status | body | string | — | Status is ArgoCD's ConnectionStatus — Successful, Failed or Unknown. |
items[].info.serverVersion | body | string | — | ServerVersion is the kubernetes version of the destination. |
items[].name | body | string | — | Name is what the Destination column shows: "in-cluster" for this cluster, otherwise whatever spec.destination.name declares, falling back to the server URL… |
items[].server | body | string | — | Server is the destination's API URL, and the key the list is deduplicated by. |
metadata | body | argoListMeta | — | |
metadata.resourceVersion | body | string | — | ResourceVersion is the k8s list version a watch would resume from. |
Failure carries the platform error shape — see Errors.
Examples
hanzo deploy clustersimport { 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 := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DeployAPI.GetDeployClusters(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + 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"The door reaches deploy through the deploy tool, which names its 21 operations with its own verbs — this one among them, under a name only the door 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": "get_deploy_account_can_i"
}
}
}'How is this guide?