Skip to main content
POST
创建企业级蓝图

权限

需要拥有企业级 ManageAccountSnapshots 权限的服务用户或个人访问令牌。

行为

创建企业级蓝图。蓝图定义了 Devin 会话的声明式环境配置。修改蓝图后不会自动触发构建——你必须显式调用 builds 端点。

授权

Authorization
string
header
必填

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

请求体

application/json
contents
string | null

新蓝图的 YAML 正文。省略时将创建一个空白蓝图。

响应

成功响应

公开的 Blueprint 资源结构。

注意:type 枚举未来可能会扩展;客户端 MUST 以优雅方式 处理未知值。YAML 内容需通过 GET /blueprints/{id}/contents 单独获取。

blueprint_id
string
必填
created_at
integer
必填
repo_name
string | null
必填
type
enum<string>
必填
可用选项:
enterprise,
org,
repo
updated_at
integer
必填
build_on_default_branch_commit
boolean | null

是否在每次向代码仓库的默认分支推送时构建环境。仅当此蓝图为代码仓库的根蓝图时有效,否则为 null。

report_check_runs
boolean | null

是否将每次 commit 构建作为 GitHub 检查运行上报至对应的 commit。仅当此蓝图为代码仓库的根蓝图时有效,否则为 null。

source
enum<string> | null

YAML 的编写位置:'git'(从代码仓库中的 .devin/blueprint.yaml 同步)或 'database'(通过 API/UI 编辑)。企业级和组织级蓝图的此值始终为 null。

可用选项:
git,
database