跳转到主要内容
POST
/
v2
/
enterprise
/
organizations
/
{org_id}
/
clone
克隆仓库
curl --request POST \
  --url https://api.devin.ai/v2/enterprise/organizations/{org_id}/clone \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "repo": "<string>",
  "setup_steps": {
    "_RepoSetupStepsT__setup_steps_format_version": "<string>",
    "repo_note": "<string>",
    "repo_commands": [
      {
        "commands": [
          "<string>"
        ],
        "project_path": "<string>",
        "status": "verified",
        "type": "pull_repo",
        "default_branch": "<string>",
        "description": "<string>",
        "locked": true,
        "repo_path": "<string>"
      }
    ],
    "repo_projects": [
      {
        "path": "<string>"
      }
    ]
  },
  "startup_commands": [
    "<string>"
  ]
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "org_id": "<string>",
  "snapshot_id": "<string>",
  "snapshot_name": "<string>",
  "status": "<string>",
  "ami_id": "<string>"
}
需要 Enterprise 管理员的个人 API key。 在组织中克隆一个 Git 代码仓库,并生成一个新的快照版本。

授权

Authorization
string
header
必填

仅供 Enterprise 管理员使用的个人 API Key(apk_user_*)

路径参数

org_id
string
必填

请求体

application/json
repo
string
必填
setup_steps
RepoSetupStepsT · object
startup_commands
string[] | null

响应

成功的响应

创建快照的响应。

created_at
string<date-time>
必填

快照创建时间戳

org_id
string
必填

快照所属组织的 ID

snapshot_id
string
必填

已创建的快照 ID

snapshot_name
string
必填

已创建快照的名称

status
string
必填

快照状态(例如:pending、available)

ami_id
string | null

快照的 AMI ID(如果仍在创建中,可能为 null)