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

# Verify Git repository import

> The git repo URL must have http credentials embedded or otherwise hosted on Github and the owner has the Diversion Github app integration set up.



## OpenAPI

````yaml post /repos/import/check
openapi: 3.0.3
info:
  title: Diversion Core API
  description: >-
    Definition of the Core API used to access low-level functionality of
    Diversion
  version: 0.2.0
servers:
  - url: https://api.diversion.dev/v0
    description: Base endpoint
security: []
paths:
  /repos/import/check:
    post:
      tags:
        - Repository Manipulation
      summary: Check if a git repo could be imported to Diversion
      description: >-
        The git repo URL must have http credentials embedded or otherwise hosted
        on Github and the owner has the Diversion Github app integration set up.
      operationId: src.handlers.integrations.git_import.import_verify_url
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitRepoImport'
      responses:
        '204':
          description: Git repo can be imported.
        '422':
          $ref: '#/components/responses/Error'
          description: Repo credentials are not set and therefore it cannot be imported.
        default:
          $ref: '#/components/responses/Error'
      security:
        - OAuth2:
            - coreapi/read
components:
  schemas:
    GitRepoImport:
      description: Details of a git repo to import into Diversion
      type: object
      properties:
        git_url:
          description: URL to the git repo. May be omitted if repo_id already has it set.
          type: string
    Error:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
          example: 403
        detail:
          type: string
          example: User not authorized to perform the requested action on the resource
        title:
          type: string
        type:
          type: string
      required:
        - status
        - detail
  responses:
    Error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    OAuth2:
      type: oauth2
      x-tokenInfoFunc: src.token_info.token_auth
      description: This API uses OAuth 2 with the implicit grant flow
      flows:
        implicit:
          authorizationUrl: https://auth.diversion.dev/oauth2/authorize
          scopes:
            coreapi/read: Operations with no possible side-effects
            coreapi/write: Modifying operations
            coreapi/admin: >-
              Organizational operations like adding a repo or changing repo
              properties

````