Create reconcile
Renders the configured git source and applies it to the cluster, once.
POST /v1/deploy/reconcile
| Address | https://api.hanzo.ai/v1/deploy/reconcile |
| Method | POST |
| Operation | post_deploy_reconcile |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Renders the configured git source and applies it to the cluster, once.
It runs one full GitOps sync through the embedded engine — render the configured repo, ref and path, then three-way server-side apply with scoped prune — and answers the revision it applied, the source it came from, the declared/synced/pruned/failed counts and a per-resource result. This is the WRITE half of the plane: it mutates live cluster objects and, with prune enabled, deletes objects the source no longer declares.
SuperAdmin-only and fail-closed, with the gate INSIDE the op because a typed op is also reached by POST /mcp and by the by-name call plane, where no route middleware runs. The git source is read AS THE PLATFORM, not as the caller: the coordinate is this deployment's own configuration and never a parameter, which is why the op reads no request body at all. A deployment with the engine switched off, or with no usable cluster config, answers 503; a failure to start, render or sync is a 502.
Request
The document declares no body for POST /v1/deploy/reconcile. The handler is typed in cloud but its shape is not yet emitted, so the fields are not listed here — ask MCP's describe for post_deploy_reconcile, which answers from the running route.
Response
| Status | Body | Meaning |
|---|---|---|
200 | reconcileReport | ok |
200 body — 15 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
declared | body | integer | — | Declared is how many objects the rendered source declares — the denominator the three outcome counts below are read against. |
failed | body | integer | — | Failed is how many objects the apply could not reconcile. |
instance | body | string | — | Instance is the tracking id this run stamps on everything it manages, so a later run can tell the objects it owns from objects another instance declares. |
prune | body | boolean | — | Prune reports whether DELETION was enabled for this run. |
pruned | body | integer | — | Pruned is how many live objects this run DELETED because the source no longer declares them. |
results | body | appliedResource[] | — | Results is one entry per object the run acted on, in the order the engine applied them. |
results[].message | body | string | — | Message is the engine's own sentence about this object — the apiserver's refusal on a failure, and typically empty on success. |
results[].resource | body | string | — | Resource identifies the object as group/version/kind/namespace/name, the engine's own key. |
results[].status | body | string | — | Status is what happened to this object, from the engine's closed vocabulary: Synced (applied), Pruned (deleted because the source no longer declares it),… |
revision | body | string | — | Revision is the source commit this run applied, as the source resolved it — a git commit SHA, not an image tag. |
source | body | reconcileSource | — | |
source.path | body | string | — | Path is the directory WITHIN the repository that is rendered — everything outside it is not this plane's desired state and is never applied. |
source.ref | body | string | — | Ref is the branch or tag the revision was resolved from. |
source.repo | body | string | — | Repo is the clone URL of the repository holding the desired state. |
synced | body | integer | — | Synced is how many objects the run applied successfully. |
Failure carries the platform error shape — see Errors.
Examples
hanzo deploy reconcileimport { Configuration, DeployApi } from 'hanzoai';
const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postDeployReconcile();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).post_deploy_reconcile()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DeployAPI.PostDeployReconcile(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::post_deploy_reconcile(&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).postDeployReconcile();curl -X POST https://api.hanzo.ai/v1/deploy/reconcile \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches deploy through the deploy tool, which names its 21 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": "get_deploy_account_can_i"
}
}
}'How is this guide?