Hanzo
OpenapiProjects

Points the site at an existing release — the go-live, and equally the ROLLBACK.

Points the site at an existing release — the go-live, and equally the ROLLBACK.

POST /v1/projects/{slug}/releases/{release}/activate

Addresshttps://api.hanzo.ai/v1/projects/{slug}/releases/{release}/activate
MethodPOST
Operationpost_projects_by_slug_releases_by_release_activate
AuthAuthorization: Bearer $HANZO_API_KEY

Points the site at an existing release — the go-live, and equally the ROLLBACK.

Aim it at an older release and the site serves that one again: releases are immutable and retained to the retention depth, so nothing is rebuilt or re-copied and the flip is one atomic statement. Before the flip, two conditions run in the order that gives each its own honest answer — the ROW says whether this release exists for this tenant at all (404, with no signal about a foreign id), and only then do the BYTES say whether it can still serve (410 GONE when retention has reclaimed them; that rollback target is not coming back, so publish again). Going live also claims the public host and purges the edge, so the release is reachable and no cached predecessor is served. NOT billed: no new content is produced, only a pointer moved.

Scope: a validated principal is required (403 without one) and the site is resolved within that principal's org, so another tenant's slug is a 404.

Request

2 fields.

FieldInTypeRequiredDescription
slugpathstringyesSlug is the site the release belongs to, from the path.
releasepathstringyesRelease is the content-addressed release id ("rel_" + 32 hex chars), from the path.

Response

StatusBodyMeaning
200projectsReleaseok

200 body — 8 fields.

FieldInTypeAlwaysDescription
activebodybooleanActive is whether this is the release the site is SERVING right now.
bytesbodyintegerBytes is their total size in bytes.
createdAtbodyintegerCreatedAt is when the release was cut, as Unix seconds — not when it was last activated.
objectsbodyintegerObjects is how many files the release holds.
releaseIdbodystringReleaseID is derived from a DIGEST of the release's own manifest, so identical content is the same release and a release can never be confused with another…
slugbodystringSlug is the site this release belongs to.
sourcebodystringSource is what the release was cut from — the build output or upload it was promoted out of.
urlbodystringURL is where the site serves.

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.


Projects API · All Hanzo APIs · Interactive reference

How is this guide?

On this page