Create rollback

Serves the console's rollback control, and today it requests a reconcile and nothing more.

POST /v1/deploy/applications/{name}/rollback

Addresshttps://api.hanzo.ai/v1/deploy/applications/{name}/rollback
MethodPOST
Operationpost_deploy_applications_by_name_rollback
AuthAuthorization: Bearer $HANZO_API_KEY

Serves the console's rollback control, and today it requests a reconcile and nothing more.

The opening verb is not style. zipdoc drops a leading CamelCase symbol only when a plain verb follows it and never before a copula (internal/zipdoc/ extract.go:811-824, "CompleteDeployment IS the CI completion hook" would otherwise become "Is the CI completion hook") — so "RollbackDeployApplication is …" would publish a Go symbol no caller can see into the summary an SDK docstring, an MCP tool list and a CLI help line all show.

It performs exactly what the sync action performs — the same stamp on the same App CR, the same application re-projected — and it does NOT select, pin or revert to a prior image tag. That is the one thing to know before wiring anything to it: the name is the console's, the behaviour is the sync. Pinning a previous release rides the release client, which this address does not call yet.

Same gate, same refusals and the same absent request body as the sync it shares a core with.

Request

1 field.

FieldInTypeRequiredDescription
namepathstringyesName is the application to read, from the path.

Response

StatusBodyMeaning
200deploy.argoAppok
defaultproblem-detailsrefused

200 body — 39 fields.

FieldInTypeAlwaysDescription
apiVersionbodystring—APIVersion is the constant "argoproj.io/v1alpha1" — the shape, not the source.
kindbodystring—Kind is the constant "Application".
metadatabodydeploy.argoMeta—
metadata.creationTimestampbodystring—CreationTimestamp is when the source object was created, RFC 3339 to the second.
metadata.labelsbodyobject—Labels are the labels this projection puts on the row, not the source object's full label set.
metadata.labels.*bodystring—
metadata.namebodystring—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 project.
metadata.namespacebodystring—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.uidbodystring—UID is the k8s metadata.uid of the source object, which is what the SPA keys a row on across refreshes.
specbodydeploy.argoSpec—
spec.destinationbodydeploy.argoDestination—
spec.destination.namebodystring—ArgoCD allows a destination by cluster name; omitted for the in-cluster projection.
spec.destination.namespacebodystring—Namespace is where in that cluster the workload lands.
spec.destination.serverbodystring—Server is the cluster API URL the application reconciles into.
spec.projectbodystring—Project is the AppProject this application is grouped and filtered under.
spec.sourcebodydeploy.argoSource—
spec.source.pathbodystring—Path is the directory within RepoURL.
spec.source.repoURLbodystring—RepoURL is the git repository the desired state comes from.
spec.source.targetRevisionbodystring—TargetRevision is the git ref tracked there — a branch such as "main".
statusbodydeploy.argoStatus—
status.healthbodydeploy.argoHealth—
status.health.messagebodystring—Message is why the status is what it is — "Running: no replicas ready", "iam: CrashLoopBackOff".
status.health.statusbodystring—Status is the ArgoCD health vocabulary, Capitalized: Healthy, Progressing, Degraded, Suspended, Missing or Unknown.
status.reconciledAtbodystring—ReconciledAt is when the desired state was last compared against the cluster, RFC 3339.
status.resourcesbodydeploy.argoResourceStatus[]—Resources are the objects the application owns.
status.resources[].groupbodystring—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 for the App CR itself.
status.resources[].healthbodydeploy.argoHealth—
status.resources[].health.messagebodystring—Message is why the status is what it is — "Running: no replicas ready", "iam: CrashLoopBackOff".
status.resources[].health.statusbodystring—Status is the ArgoCD health vocabulary, Capitalized: Healthy, Progressing, Degraded, Suspended, Missing or Unknown.
status.resources[].kindbodystring—Kind is the object kind — App, Deployment, ReplicaSet, Pod, Service, Ingress, HorizontalPodAutoscaler, PodDisruptionBudget, ConfigMap.
status.resources[].namebodystring—Name is the object's metadata.name.
status.resources[].namespacebodystring—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[].statusbodystring—Status is the APPLICATION's sync verdict repeated on every row, not a per-object one.
status.resources[].versionbodystring—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.summarybodydeploy.argoSummary—
status.summary.imagesbodystring[]—Images are the container images the application runs.
status.syncbodydeploy.argoSyncStatus—
status.sync.revisionbodystring—Revision is what Status was reached against.
status.sync.statusbodystring—Status is the ArgoCD sync vocabulary, Capitalized: Synced, OutOfSync or Unknown.

Failure carries the platform error shape — see Errors.

Examples

hanzo deploy applications rollback <name>
import { Configuration, DeployApi } from 'hanzoai';

const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postDeployApplicationsByNameRollback({ 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_rollback(name='name')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DeployAPI.PostDeployApplicationsByNameRollback(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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_rollback(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DeployApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new DeployApi(client).postDeployApplicationsByNameRollback();
curl -X POST https://api.hanzo.ai/v1/deploy/applications/<name>/rollback \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches deploy through the deploy tool, which names its 11 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": "list_deploy_applications"
         }
       }
     }'

Deploy API · All Hanzo APIs · Interactive reference

Was this page useful?