跳转到主要内容
POST
/
v2
/
enterprise
/
organizations
/
{org_id}
/
clone
Clone Repo
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 代码仓库,并生成一个新的快照版本。

Authorizations

Authorization
string
header
required

Personal API Key (apk_user_*) for Enterprise Admins only

Path Parameters

org_id
string
required

Body

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

Response

Successful Response

Response from creating a snapshot.

created_at
string<date-time>
required

Timestamp when the snapshot was created

org_id
string
required

Organization ID the snapshot belongs to

snapshot_id
string
required

ID of the created snapshot

snapshot_name
string
required

Name of the created snapshot

status
string
required

Status of the snapshot (e.g., 'pending', 'available')

ami_id
string | null

AMI ID of the snapshot (may be null if still being created)