> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Clonare un repository in un'organizzazione

> Clonare un repository in uno snapshot dell'organizzazione

Richiede l'API key personale di un amministratore Enterprise.

Clona un repository Git in un'organizzazione e crea una nuova versione di snapshot.


## OpenAPI

````yaml it/v2-openapi.yaml POST /v2/enterprise/organizations/{org_id}/clone
openapi: 3.1.0
info:
  description: API Devin v2 con Personal API Keys per gli amministratori Enterprise
  title: Devin API v2
  version: 2.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v2/enterprise/organizations/{org_id}/clone:
    post:
      tags:
        - organizations
      summary: Clona repository
      operationId: clone_repo_v2_enterprise_organizations__org_id__clone_post
      parameters:
        - in: path
          name: org_id
          required: true
          schema:
            title: Org Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloneRepoRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRepoSnapshotResponse'
          description: Risposta corretta
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Errore di validazione
components:
  schemas:
    CloneRepoRequest:
      properties:
        pull_repo_commands:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Comando per eseguire il pull del repository. Consigliamo di
            lasciarlo vuoto, perché viene generato automaticamente.
          title: Pull Repo Commands
        repo_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Note
        repo_path:
          description: >-
            Percorso del repository nel formato "owner/repo_name" (ad es.
            "acme/my-project")
          examples:
            - owner/repo_name
          title: Repo Path
          type: string
        run_lint_commands:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Run Lint Commands
        run_project_commands:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Run Project Commands
        run_tests_commands:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Run Tests Commands
        update_dependencies_commands:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Update Dependencies Commands
      required:
        - repo_path
      title: CloneRepoRequest
      type: object
    CreateRepoSnapshotResponse:
      description: Risposta restituita dalla creazione di uno snapshot.
      properties:
        ami_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            ID AMI dello snapshot (può essere null se è ancora in corso di
            creazione)
          title: Ami Id
        created_at:
          description: Timestamp di creazione dello snapshot
          format: date-time
          title: Created At
          type: string
        org_id:
          description: ID dell'organizzazione di appartenenza dello snapshot
          title: Org Id
          type: string
        snapshot_id:
          description: ID dello snapshot creato
          title: Snapshot Id
          type: string
        status:
          description: Stato dello snapshot (ad es. "pending", "available")
          title: Status
          type: string
      required:
        - snapshot_id
        - status
        - org_id
        - created_at
      title: CreateRepoSnapshotResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: API key personale (apk_user_*) riservata agli amministratori Enterprise
      scheme: bearer
      type: http

````