跳转到主要内容
POST
/
v3beta1
/
organizations
/
{org_id}
/
snapshot-setup
/
blueprints
创建组织或 repo 层级蓝图
curl --request POST \
  --url https://api.devin.ai/v3beta1/organizations/{org_id}/snapshot-setup/blueprints \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contents": "<string>",
  "repo_name": "<string>"
}
'
{
  "blueprint_id": "<string>",
  "created_at": 123,
  "repo_name": "<string>",
  "type": "enterprise",
  "updated_at": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.devin.ai/llms.txt

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

权限

要求服务用户在组织级别具备 ManageRepoBlueprints 权限。创建组织级蓝图还需要 ManageOrgSnapshots 权限。

行为

创建组织层级或代码仓库层级蓝图。蓝图用于定义 Devin 会话的声明式环境配置。修改蓝图不会自动触发构建——你必须显式调用 builds 端点。

授权

Authorization
string
header
必填

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

请求体

application/json
contents
string | null

蓝图的可选初始 YAML 内容。

repo_name
string | null

如果设置,则为该代码仓库创建代码仓库层级蓝图;如果省略,则创建组织范围的蓝图(组织层级)。

响应

成功响应

公开的 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
必填