v1

latestOpenAPI 3.1.02026-08-04151221521.2 KB
Branches

Rollback Branch by Git Branch Name

Roll back a branch to a previous version by namespace, agent, and git branch name.

Key behavior:
- EnvVar table is NOT modified (remains pending state)
- Uses Version.secrets_snapshot as deployed state
post/agents/{namespace_slug}/{agent_name}/branches/{branch}/rollback

Path parameters

namespace_slugstring required
agent_namestring required
branchstring required

Request body

target_version_idstring nullable

Version ID to rollback to (defaults to previous version if not specified)

Response

Successful Response

branch_idstring required

Branch ID

from_git_hashstring required

Git hash of the previous version

from_version_idstring required

Version ID that was rolled back FROM

messagestring required

Human-readable status message

to_git_hashstring required

Git hash of the target version

to_version_idstring required

Version ID that was rolled back TO

version_status'DEPLOYING' | 'ACTIVE' | 'FAILED' | 'UNHEALTHY' | 'DRAINING' | 'RETIRED' | 'ROLLED_BACK' required

Status of a version in its lifecycle.