Containers API
Deploy, redeploy, and operate container workloads through api.hanzo.ai/v1/platform.
A container is a deployable workload on Hanzo PaaS — an app inside a project. Everything you do to one goes through the same host, the same bearer, and the same path shape:
https://api.hanzo.ai/v1/platform/projects/{project}/apps/{app}[/action]Get a bearer first — see Authentication:
TOKEN=$(curl -sS -X POST https://api.hanzo.ai/v1/kms/auth/login \
-H 'Content-Type: application/json' \
-d "{\"clientId\":\"$KMS_CLIENT_ID\",\"clientSecret\":\"$KMS_CLIENT_SECRET\"}" | jq -r .accessToken)Create an app
curl -fsS -X POST https://api.hanzo.ai/v1/platform/projects/$PROJECT/apps \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "web", "description": "Public web app" }'Deploy
curl -fsS -X POST \
"https://api.hanzo.ai/v1/platform/projects/$PROJECT/apps/web/deploy" \
-H "Authorization: Bearer $TOKEN"This rolls the workload forward with a zero-downtime rolling update — it re-pulls the image and recreates pods. It does not build. To produce a new image first, enqueue a build:
curl -fsS -X POST https://api.hanzo.ai/v1/runner \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"repo": "https://github.com/hanzoai/docs",
"sha": "'$SHA'",
"image": "ghcr.io/hanzoai/docs:v1.4.0"
}'
# → 202 {"buildJobId":"…","status":"queued","runnerPool":"…","image":"…","target":"…"}Builds run on Hanzo's own in-cluster BuildKit. repo must be a full https:// URL, and image must push to a registry we own (ghcr.io/{hanzoai,luxfi,zooai}/*) in the caller's own org namespace — the server refuses anything else. Never build images locally.
Lifecycle
curl -fsS -X POST ".../apps/web/stop" -H "Authorization: Bearer $TOKEN"
curl -fsS -X POST ".../apps/web/start" -H "Authorization: Bearer $TOKEN"Inspect
| Method | Path | Purpose |
|---|---|---|
GET | /v1/platform/projects/{project}/apps | List apps |
GET | /v1/platform/projects/{project}/apps/{app} | One app |
GET | /v1/platform/projects/{project}/apps/{app}/deployments | Deployment history |
GET | /v1/platform/projects/{project}/apps/{app}/deployments/{id} | One deployment |
GET | /v1/platform/projects/{project}/apps/{app}/deployments/{id}/logs | Deployment logs |
DELETE | /v1/platform/projects/{project}/apps/{app} | Remove the app |
Application status values
| Status | Description |
|---|---|
idle | Registered, not running |
running | Deployed and serving |
done | Last deployment completed |
error | A deployment or replica failed |
DELETE stops all instances and removes associated domains and volumes. This cannot be undone.
How is this guide?
Last updated on