> ## 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.

# Cloner un dépôt dans une organisation

> Cloner un dépôt dans l’instantané de l’organisation

Nécessite une clé API personnelle d’administrateur Enterprise.

Clone un dépôt Git dans une organisation et crée une nouvelle version d’instantané.


## OpenAPI

````yaml fr/v2-openapi.yaml POST /v2/enterprise/organizations/{org_id}/clone
openapi: 3.1.0
info:
  description: >-
    API Devin v2 avec clés d’API personnelles pour les administrateurs
    Enterprise
  title: Devin API v2
  version: 2.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v2/enterprise/organizations/{org_id}/clone:
    post:
      tags:
        - organizations
      summary: Cloner le dépôt
      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: Réponse réussie
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Erreur de validation
components:
  schemas:
    CloneRepoRequest:
      properties:
        pull_repo_commands:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Commandes permettant de cloner le dépôt. Il est recommandé de
            laisser ce champ vide, car il sera généré automatiquement.
          title: Pull Repo Commands
        repo_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Note
        repo_path:
          description: >-
            Chemin du dépôt, au format « owner/repo_name » (par exemple : «
            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: Réponse renvoyée après la création d'un instantané.
      properties:
        ami_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            ID de l'AMI de l'instantané (peut être null s'il est encore en cours
            de création)
          title: Ami Id
        created_at:
          description: Horodatage de la création de l’instantané
          format: date-time
          title: Created At
          type: string
        org_id:
          description: ID de l'organisation dont relève le snapshot
          title: Org Id
          type: string
        snapshot_id:
          description: ID de l’instantané créé
          title: Snapshot Id
          type: string
        status:
          description: 'Statut de l’instantané (par exemple : « 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 personnelle (apk_user_*) réservée uniquement aux administrateurs
        Enterprise
      scheme: bearer
      type: http

````