Sync applications
Asks the operator to reconcile ONE application now.
POST /v1/deploy/applications/{name}/sync
| Address | https://api.hanzo.ai/v1/deploy/applications/{name}/sync |
| Method | POST |
| Operation | post_deploy_applications_by_name_sync |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Asks the operator to reconcile ONE application now.
It stamps a sync-requested timestamp onto the application's App CR, which the operator's watch observes, and answers the application re-projected. It ASKS, it does not apply: the operator reconciles on its own clock, so a 200 means the request landed, not that the rollout finished — the returned row's running version still lags until it does.
SuperAdmin-only and fail-closed, and the gate is INSIDE the op rather than in middleware wrapped around the route. That is a correctness requirement, not a preference: this op is also reached by POST /mcp and by the by-name call plane, neither of which runs route middleware, so a gate that only the REST projection runs would publish an unguarded alias of a fleet-mutating write. It reads no request body — the URL names the application and nothing else does. An unknown name is a 404 (never a 403, which would confirm the application exists), a name that is not a DNS-1123 label is a 400, and no cluster client is a 503.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | Name is the application to read, from the path. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | argoApp | ok |
200 body — 39 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
apiVersion | body | string | — | APIVersion is the constant "argoproj.io/v1alpha1" — the shape, not the source. |
kind | body | string | — | Kind is the constant "Application". |
metadata | body | argoMeta | — | |
metadata.creationTimestamp | body | string | — | CreationTimestamp is when the source object was created, RFC 3339 to the second. |
metadata.labels | body | object | — | Labels are the labels this projection puts on the row, not the source object's full label set. |
metadata.labels.* | body | string | — | |
metadata.name | body | string | — | Name is the projected object's name: the App CR's metadata.name for an application, the CD Application's name for a CD row, and the IAM project name for a… |
metadata.namespace | body | string | — | Namespace is the namespace the source object was read from — the tenant or platform namespace for an App CR, CD's controller namespace for a CD row. |
metadata.uid | body | string | — | UID is the k8s metadata.uid of the source object, which is what the SPA keys a row on across refreshes. |
spec | body | argoSpec | — | |
spec.destination | body | argoDestination | — | |
spec.destination.name | body | string | — | ArgoCD allows a destination by cluster name; omitted for the in-cluster projection. |
spec.destination.namespace | body | string | — | Namespace is where in that cluster the workload lands. |
spec.destination.server | body | string | — | Server is the cluster API URL the application reconciles into. |
spec.project | body | string | — | Project is the AppProject this application is grouped and filtered under. |
spec.source | body | argoSource | — | |
spec.source.path | body | string | — | Path is the directory within RepoURL. |
spec.source.repoURL | body | string | — | RepoURL is the git repository the desired state comes from. |
spec.source.targetRevision | body | string | — | TargetRevision is the git ref tracked there — a branch such as "main". |
status | body | argoStatus | — | |
status.health | body | argoHealth | — | |
status.health.message | body | string | — | Message is why the status is what it is — "Running: no replicas ready", "iam: CrashLoopBackOff". |
status.health.status | body | string | — | Status is the ArgoCD health vocabulary, Capitalized: Healthy, Progressing, Degraded, Suspended, Missing or Unknown. |
status.reconciledAt | body | string | — | ReconciledAt is when the desired state was last compared against the cluster, RFC 3339. |
status.resources | body | argoResourceStatus[] | — | Resources are the objects the application owns. |
status.resources[].group | body | string | — | Group is the object's API group: empty for the core group (Pod, Service, ConfigMap), otherwise apps, networking.k8s.io, autoscaling or policy — and hanzo.ai… |
status.resources[].health | body | argoHealth | — | |
status.resources[].health.message | body | string | — | Message is why the status is what it is — "Running: no replicas ready", "iam: CrashLoopBackOff". |
status.resources[].health.status | body | string | — | Status is the ArgoCD health vocabulary, Capitalized: Healthy, Progressing, Degraded, Suspended, Missing or Unknown. |
status.resources[].kind | body | string | — | Kind is the object kind — App, Deployment, ReplicaSet, Pod, Service, Ingress, HorizontalPodAutoscaler, PodDisruptionBudget, ConfigMap. |
status.resources[].name | body | string | — | Name is the object's metadata.name. |
status.resources[].namespace | body | string | — | Namespace is the namespace the object was found in — the same one for every entry of an application, since the walk is confined to it. |
status.resources[].status | body | string | — | Status is the APPLICATION's sync verdict repeated on every row, not a per-object one. |
status.resources[].version | body | string | — | Version is the object's API version as the live object reports it: v1 for every kind here except the HorizontalPodAutoscaler, which is autoscaling/v2. |
status.summary | body | argoSummary | — | |
status.summary.images | body | string[] | — | Images are the container images the application runs. |
status.sync | body | argoSyncStatus | — | |
status.sync.revision | body | string | — | Revision is what Status was reached against. For an App CR that is the declared IMAGE TAG, not a commit — the CR is image-pinned. |
status.sync.status | body | string | — | Status is the ArgoCD sync vocabulary, Capitalized: Synced, OutOfSync or Unknown. |
Failure carries the platform error shape — see Errors.
Examples
hanzo deploy applications sync <name>import { Configuration, DeployApi } from 'hanzoai';
const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postDeployApplicationsByNameSync({ name: 'name' });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_applications_by_name_sync(name='name')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DeployAPI.PostDeployApplicationsByNameSync(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_applications_by_name_sync(&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).postDeployApplicationsByNameSync();curl -X POST https://api.hanzo.ai/v1/deploy/applications/<name>/sync \
-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?