Hanzo AI
OpenapiPlatform

Sync apps

Syncs one app now: CD applies the commit it compared, to this one Application.

POST /v1/platform/apps/{app}/sync

Addresshttps://api.hanzo.ai/v1/platform/apps/{app}/sync
MethodPOST
Operationpost_platform_apps_by_app_sync
AuthAuthorization: Bearer $HANZO_API_KEY

Syncs one app now: CD applies the commit it compared, to this one Application.

Every Application is manual — its AppProject admits only a manual sync — so this is the deploy step, requested the way cd.hanzo.ai requests one: an operation on the Application, initiated by the caller, applying the compared commit with the Application's own sync options and no pruning. It answers the Application with the operation queued; poll the app's cd read for how it ends. SuperAdmin only, the predicate CD's own RBAC holds sync to, and recorded in the audit trail like every mutation. 409 while another operation is queued, running or terminating, before CD has compared the Application with git, and when the Application changes between the read and the request.

Request

3 fields, body application/json (required).

FieldInTypeRequiredDescription
apppathstringyesApp is the declaration's name, from the path.
appbodystringApp is the declaration's name, from the path.
orgbodystringOrg is the values directory the declaration lives in, defaulting to the caller's own org.

Response

StatusBodyMeaning
202platform.cdDiffaccepted
defaultproblem-detailsrefused

202 body — 21 fields.

FieldInTypeAlwaysDescription
applicationbodystringApplication is the CD Application the declaration renders as.
appliedbodystringApplied is the universe commit CD last synced, "" before its first sync.
comparedbodystringCompared is the universe commit CD compared the cluster against — the one a sync applies.
operationbodystringOperation is the phase of a sync in flight or last run, "" when none ran.
pendingbodyplatform.CDResource[]Pending are the objects that differ from git: what a sync would apply.
pending[].groupbodystringGroup is the object's API group, "" for the core group.
pending[].healthbodystringHealth is the object's health, "" for a kind CD holds no health for.
pending[].kindbodystringKind is the object's kind.
pending[].namebodystringName is the object's name.
pending[].namespacebodystringNamespace is the object's namespace, "" for a cluster-scoped one.
pending[].prunebodybooleanPrune is true for a live object git no longer declares.
pending[].statusbodystringStatus is CD's verdict on the object: Synced or OutOfSync.
resourcesbodyplatform.CDResource[]Resources is every object the Application manages.
resources[].groupbodystringGroup is the object's API group, "" for the core group.
resources[].healthbodystringHealth is the object's health, "" for a kind CD holds no health for.
resources[].kindbodystringKind is the object's kind.
resources[].namebodystringName is the object's name.
resources[].namespacebodystringNamespace is the object's namespace, "" for a cluster-scoped one.
resources[].prunebodybooleanPrune is true for a live object git no longer declares.
resources[].statusbodystringStatus is CD's verdict on the object: Synced or OutOfSync.
syncbodystringSync is CD's verdict: Synced or OutOfSync.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Platform API · All Hanzo APIs · Interactive reference

How is this guide?

On this page