Skip to main content
POST
/
agents
/
{namespace_slug}
/
{agent_name}
/
branches
/
{branch}
/
rollback
Rollback Branch by Git Branch Name
curl --request POST \
  --url https://api.example.com/agents/{namespace_slug}/{agent_name}/branches/{branch}/rollback \
  --header 'Content-Type: application/json' \
  --data '
{
  "target_version_id": "<string>"
}
'
{
  "branch_id": "<string>",
  "from_git_hash": "<string>",
  "from_version_id": "<string>",
  "message": "<string>",
  "to_git_hash": "<string>",
  "to_version_id": "<string>",
  "version_status": "DEPLOYING"
}

Documentation Index

Fetch the complete documentation index at: https://docs.terminaluse.com/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

namespace_slug
string
required
agent_name
string
required
branch
string
required

Body

application/json

Request model for rolling back a branch.

target_version_id
string | null

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

Response

Successful Response

Response from a rollback operation.

branch_id
string
required

Branch ID

from_git_hash
string
required

Git hash of the previous version

from_version_id
string
required

Version ID that was rolled back FROM

message
string
required

Human-readable status message

to_git_hash
string
required

Git hash of the target version

to_version_id
string
required

Version ID that was rolled back TO

version_status
enum<string>
required

Target version status

Available options:
DEPLOYING,
ACTIVE,
FAILED,
UNHEALTHY,
DRAINING,
RETIRED,
ROLLED_BACK