Vai al contenuto principale
POST
/
v2
/
enterprise
/
organizations
/
{org_id}
/
clone
Clona repository
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_path": "<string>",
  "pull_repo_commands": [
    "<string>"
  ],
  "repo_note": "<string>",
  "run_lint_commands": [
    "<string>"
  ],
  "run_project_commands": [
    "<string>"
  ],
  "run_tests_commands": [
    "<string>"
  ],
  "update_dependencies_commands": [
    "<string>"
  ]
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "org_id": "<string>",
  "snapshot_id": "<string>",
  "status": "<string>",
  "ami_id": "<string>"
}
Richiede l’API key personale di un amministratore Enterprise. Clona un repository Git in un’organizzazione e crea una nuova versione di snapshot.

Autorizzazioni

Authorization
string
header
obbligatorio

API key personale (apk_user_*) riservata agli amministratori Enterprise

Parametri del percorso

org_id
string
obbligatorio

Corpo

application/json
repo_path
string
obbligatorio

Percorso del repository nel formato "owner/repo_name" (ad es. "acme/my-project")

Esempio:

"owner/repo_name"

pull_repo_commands
string[] | null

Comando per eseguire il pull del repository. Consigliamo di lasciarlo vuoto, perché viene generato automaticamente.

repo_note
string | null
run_lint_commands
string[] | null
run_project_commands
string[] | null
run_tests_commands
string[] | null
update_dependencies_commands
string[] | null

Risposta

Risposta corretta

Risposta restituita dalla creazione di uno snapshot.

created_at
string<date-time>
obbligatorio

Timestamp di creazione dello snapshot

org_id
string
obbligatorio

ID dell'organizzazione di appartenenza dello snapshot

snapshot_id
string
obbligatorio

ID dello snapshot creato

status
string
obbligatorio

Stato dello snapshot (ad es. "pending", "available")

ami_id
string | null

ID AMI dello snapshot (può essere null se è ancora in corso di creazione)