跳到导航

更新智能体分支

更新智能体分支属性,例如名称、说明、归档状态、保护级别、自动 rebase 及其保持同步的分支

路径参数

agent_idstring必需

智能体 ID。创建智能体时返回此值。

branch_idstring必需

分支的唯一标识符。

请求头

xi-api-keystring可选

请求

This endpoint expects an object.
namestring可选1-140 characters

分支新名称。必须在该智能体内唯一。

descriptionstring可选<=4096 characters

分支的新描述。传入空字符串即可清除。

is_archivedboolean可选

是否应归档该分支

protection_statusenum可选默认为 writer_perms_required

分支保护级别

允许的值:
auto_rebaseboolean可选

为 true 时,此分支保持同步的分支(sync_branch_id,默认为主分支)每有新版本,就会自动对此分支执行 rebase。不可在主分支上启用,也不可在此分支的保护级别高于其保持同步的非主分支时启用。

sync_branch_idstring可选

要与此分支保持同步的分支 ID:启用 auto_rebase 后,会自动拉取其新版本,并与其比较提交数量。传入主分支 ID 可重新与 main 同步。必须是主分支,或创建此分支时所基于的活跃分支(parent_branch_id)。连续相互同步的分支最多为 10 个。不能在主分支上设置。

响应

成功响应

idstring
namestring
agent_idstring
descriptionstring
created_atinteger
last_committed_atinteger
is_archivedboolean
protection_statusenum可选默认为 writer_perms_required
允许的值:
auto_rebaseboolean可选默认为 false
sync_statusobject可选

当分支与另一分支保持同步时设置:自动同步(auto_rebase),或与指定的非主分支同步。否则为 Null。

access_infoobject可选

分支访问信息

current_live_percentagedouble可选默认为 0

分支上已上线的流量百分比

parent_branchobject可选

该分支的父分支

most_recent_versionslist of objects可选

分支上的最新版本

错误

422
Branches Update Request Unprocessable Entity Error