Skip to navigation

Update agent branch

Update agent branch properties such as name, description, archiving status, protection level, auto-rebase, and the branch it is kept in sync with

Path parameters

agent_idstringRequired
The id of an agent. This is returned on agent creation.
branch_idstringRequired
Unique identifier for the branch.

Headers

xi-api-keystringOptional

Request

This endpoint expects an object.
namestring or nullOptional1-140 characters
New name for the branch. Must be unique within the agent.
descriptionstring or nullOptional<=4096 characters
New description for the branch. Pass an empty string to clear it.
is_archivedboolean or nullOptional
Whether the branch should be archived
protection_statusenum or nullOptionalDefaults to writer_perms_required
The protection level for the branch
Allowed values:
auto_rebaseboolean or nullOptional

When true, rebase this branch automatically after each new version of the branch it is kept in sync with (sync_branch_id, main by default). Cannot be enabled on the main branch, or while this branch is more protected than a non-main branch it is kept in sync with.

sync_branch_idstring or nullOptional

ID of the branch to keep this branch in sync with: its new versions are pulled in automatically while auto_rebase is on. Pass the main branch’s ID to sync with main again. Must be the main branch or the active branch this branch was created from (parent_branch_id). At most 10 branches can be kept in sync with one another in a row. Cannot be set on the main branch.

Response

Successful Response
idstring
namestring
agent_idstring
descriptionstring
created_atinteger
last_committed_atinteger
is_archivedboolean
protection_statusenumOptionalDefaults to writer_perms_required
Allowed values:
auto_rebasebooleanOptionalDefaults to false
sync_statusobject or nullOptional

Set while the branch is kept in sync with another branch: automatically (auto_rebase), or with a chosen branch other than main. Null otherwise.

access_infoobject or nullOptional
Access information for the branch
current_live_percentagedoubleOptionalDefaults to 0
Percentage of traffic live on the branch
parent_branchobject or nullOptional
Parent branch of the branch
most_recent_versionslist of objectsOptional
Most recent versions on the branch

Errors

422
Unprocessable Entity Error