Lists every Hanzo CD Application in the cluster: the git source each one polls,…
Lists every Hanzo CD Application in the cluster: the git source each one polls, the commit it last APPLIED, how its last sync operation ended, and its…
GET /v1/deploy/gitops
| Address | https://api.hanzo.ai/v1/deploy/gitops |
| Method | GET |
| Operation | get_deploy_gitops |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Lists every Hanzo CD Application in the cluster: the git source each one polls, the commit it last APPLIED, how its last sync operation ended, and its recent deploy history — newest deploy first, ordered by namespace then name.
This is the layer ABOVE the application board, and the two disagree in exactly the case an operator most needs to see: main carries a new image pin, CD has not applied that commit yet, so every App CR still declares the old tag and the application board is legitimately "Synced" while the deploy has not landed. Only the applied revision here can show that.
installed is false — with a reason and an empty list — when the CD CRD is not served in this cluster. That is a FACT about the cluster rather than a failure of the request, so the caller can say "no CD plane here" instead of rendering an error it cannot act on; a genuine transport or RBAC failure still errors.
Read-only, and platform SuperAdmin only: the CD plane is fleet infrastructure with no tenant dimension. This view observes CD and never drives it — the sync policy is automated with self-heal, and the actionable verb an operator has is the per-application reconcile at POST /v1/deploy/applications/{name}/sync.
Request
GET /v1/deploy/gitops takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | GitOpsPlane | ok |
200 body — 28 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
applications | body | GitOpsApp[] | — | Applications is every CD Application in the cluster, ordered by namespace then name. |
applications[].automated | body | boolean | — | Automated is whether CD applies new commits without being asked. |
applications[].health | body | string | — | Health is CD's verdict on the objects it manages, verbatim: Healthy, Progressing, Degraded, Suspended, Missing or Unknown. |
applications[].history | body | GitOpsDeploy[] | — | History is the recent deploy log, NEWEST FIRST and capped at ten. |
applications[].history[].automated | body | boolean | — | Automated is whether CD started this deploy itself, from its own polling of the tracked git ref (initiatedBy.automated), rather than someone asking for it. |
applications[].history[].deployedAt | body | string | — | DeployedAt is when the apply finished, RFC 3339. |
applications[].history[].id | body | integer | — | ID is CD's own sequence number for this deploy (status.history[].id). |
applications[].history[].revision | body | string | — | Revision is the git commit this deploy applied, as CD recorded it. |
applications[].history[].startedAt | body | string | — | StartedAt is when CD began applying the revision (deployStartedAt), RFC 3339. |
applications[].name | body | string | — | Name is what CD calls this tracked source, not the workload it deploys — the Application CR's own metadata.name. |
applications[].namespace | body | string | — | Namespace is where the Application OBJECT lives: CD's own controller namespace, which is the same one for every row here. |
applications[].operation | body | GitOpsOperation | — | |
applications[].operation.finishedAt | body | string | — | FinishedAt is when it ended, RFC 3339. |
applications[].operation.message | body | string | — | Message is CD's account of the phase — "successfully synced (all tasks run)" for a Succeeded operation, the reason it stopped for a Failed one. |
applications[].operation.phase | body | string | — | Phase is how the last sync operation ended, in CD's own vocabulary: Running, Succeeded or Failed. |
applications[].operation.revision | body | string | — | Revision is the commit this operation ATTEMPTED (operationState.syncResult). |
applications[].operation.startedAt | body | string | — | StartedAt is when the operation began, RFC 3339. |
applications[].path | body | string | — | Path is the directory inside that repository CD renders, relative to its root. |
applications[].project | body | string | — | Project is the AppProject fence the sync is admitted under: which repos this Application may pull from and which destinations it may write to. |
applications[].reconciledAt | body | string | — | ReconciledAt is when CD last COMPARED this Application against git, RFC 3339. |
applications[].repoURL | body | string | — | RepoURL is the git repository CD polls for this Application's desired state. |
applications[].resources | body | integer | — | Resources is how MANY objects CD manages for this Application (len(status.resources)) — a count, not the objects. |
applications[].revision | body | string | — | Revision is the commit CD last APPLIED (status.sync.revision). |
applications[].selfHeal | body | boolean | — | SelfHeal is whether CD also reverts changes made directly in the cluster (syncPolicy.automated.selfHeal). |
applications[].sync | body | string | — | Sync is CD's verdict on git versus cluster, verbatim: Synced, OutOfSync or Unknown. |
applications[].targetRevision | body | string | — | TargetRevision is the git ref CD TRACKS — usually a branch such as "main". |
installed | body | boolean | — | Installed is whether this cluster serves the CD Application CRD at all. |
reason | body | string | — | Reason says why the plane is absent, in words a caller can show. |
Failure carries the platform error shape — see Errors.
Examples
hanzo deploy gitopsimport { Configuration, DeployApi } from 'hanzoai';
const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDeployGitops();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_gitops()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DeployAPI.GetDeployGitops(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_gitops(&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).getDeployGitops();curl https://api.hanzo.ai/v1/deploy/gitops \
-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?