Hanzo
OpenapiPlatform

Stops an app without deleting it.

Stops an app without deleting it. It scales the app's Service to zero replicas and marks it stopped, answering the updated application.

POST /v1/platform/projects/{project}/apps/{app}/stop

Addresshttps://api.hanzo.ai/v1/platform/projects/{project}/apps/{app}/stop
MethodPOST
Operationpost_platform_projects_by_project_apps_by_app_stop
AuthAuthorization: Bearer $HANZO_API_KEY

Stops an app without deleting it.

It scales the app's Service to zero replicas and marks it stopped, answering the updated application. Nothing else is removed — the record, its env, its domains and its deployment history all survive, and /start brings it back at the same replica count.

An app that is not deployed has no Service CR to scale and is 404. An unreachable cluster is 503 and a cluster that refuses the scale is 502. Because the pods stop, so does the compute metering. Requires a validated principal; 403 without one.

Request

2 fields.

FieldInTypeRequiredDescription
projectpathstringyesProject is the project the application lives under, from the path.
apppathstringyesApp is the application's slug, from the path.

Response

StatusBodyMeaning
200appViewok

200 body — 34 fields.

FieldInTypeAlwaysDescription
buildTypebodystringBuildType is how a git app builds: pack, the zero-config default that detects the project, or dockerfile.
createdAtbodyintegerCreatedAt is when the app was created, unix seconds.
currentDeploymentIdbodystringCurrentDeploymentID is the deployment that is live — the pointer a deploy advances monotonically by version, so it never regresses to an older one.
descriptionbodystringDescription is free text about what the app is.
dockerfilebodystringDockerfile is the path inside the repo to build from, for buildType dockerfile.
domainsbodystring[]Domains are the ingress hosts rendered into the app's CR, its own <slug>.<org>.<sites host> first.
envbodyEnvVarJSON[]Env is the app's environment variables, with every SECRET value masked to "" — the plaintext is in KMS and this surface never echoes it.
env[].keybodystringKey is the variable's name in the container, which must match ^[A-Za-z_][A-Za-z0-9_]*$.
env[].secretbodybooleanSecret says the value lives in KMS and never in the database.
env[].valuebodystringValue is the plaintext, and it is WRITE-ONLY once the entry is secret: a sealed value reads back as "", and sending "" again KEEPS what is sealed rather than…
environmentbodystringEnvironment is the deploy target this app names, production when none was given.
healthbodystringHealth rolls ready-vs-desired replicas up to a colour: green (all ready), yellow (some ready, or deliberately scaled to zero), red (none), or "" when the…
idbodystringID is the server-minted application id (app_…).
imagebodyimageView
image.repositorybodystringRepository is the image path without a tag (ghcr.io/acme/api). Required for source image, which runs it as-is.
image.tagbodystringTag is the tag to run: what the create declared, then RE-STAMPED on every transition to live with the tag that actually went live.
namebodystringName is the display name.
namespacebodystringNamespace is where the app's cluster objects live, tenant-<org>.
orgbodystringOrg is the tenant that owns the app.
phasebodystringPhase is the operator's own status.phase for the app's Service CR, read from the cluster on this request.
portbodyintegerPort is the container port traffic is sent to.
projectIdbodystringProjectID is the IAM project the app lives under, and it is that project's NAME — the (org,name) key IAM identifies it by, which is also what the :project
replicasbodyintegerReplicas is how many copies the CR declares.
repobodygitSource
repo.branchbodystringBranch is the branch a push-to-deploy build tracks, main when the create named none — a push to any other branch, and every tag push, builds nothing here.
repo.providerbodystringProvider is derived from the URL — github, gitlab, bitbucket, or git for anything else.
repo.urlbodystringURL is the clone URL a git app builds from, stored as sent once the build path's allowlist accepted it (validateRepoURL).
secretSyncbodystringSecretSync is how far the app's secret env has got into the cluster: ""|pending|syncing|ready|failed (secrets.go).
secretSyncDetailbodystringSecretSyncDetail is the honest reason when the sync is not ready — a missing CRD, an RBAC grant, a per-tenant credential.
slugbodystringSlug is the app's identity in the cluster: the operator CR's name, the first label of its default host, and the :app path segment.
sourcebodystringSource is what the app deploys FROM: git, which builds Repo, or image, which runs Image as it is.
statusbodystringStatus is the lifecycle THIS store records: draft (created, nothing in the cluster yet), building, deploying, live, stopped or error.
storageGbbodyintegerStorageGB is the persistent volume size in GiB.
updatedAtbodyintegerUpdatedAt is when it last changed, unix seconds.

Failure carries the platform error shape — see Errors.

Examples

hanzo platform projects apps stop <project> <app>

Platform API · All Hanzo APIs · Interactive reference

How is this guide?

On this page