Skip to main content
POST
将组织固定到某个特定的成功构建

权限

需要一个在组织级别具有 ManageOrgSnapshots 权限的服务用户。

行为

将组织固定到某个特定的成功构建。后续新会话将使用该固定快照,直到取消固定。

授权

Authorization
string
header
必填

服务用户凭据(前缀:cog_)

路径参数

build_id
string
必填
org_id
string
必填

组织 ID(前缀:org-)

示例:

"org-abc123def456"

请求体

application/json

POST /builds/{id}/pin 的请求体。根据规范为空。

响应

成功响应

公开的 Build 资源结构——一种仅用于判断“是否已成功”的不透明视图。

根据规范,不提供平台/快照/各个 job 的内部信息。未来新增字段 (triggered_by_repo、构建元数据等)均为叠加式扩展。

build_id
string
必填
completed_at
integer | null
必填
created_at
integer
必填
pinned
boolean
必填
started_at
integer | null
必填
status
enum<string>
必填
可用选项:
pending,
running,
succeeded,
failed,
cancelled
trigger
enum<string> | null
必填
可用选项:
manual,
auto
triggered_by_user_id
string | null
必填
updated_at
integer
必填