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

# Add an imported git repository to this project

> Add an imported git repository to this project. Required permissions: `ChangeProjectSettings`



## OpenAPI

````yaml /api-specs/cloud/public-api.yaml post /api/projects/v1/projects/{projectId}/repositories
openapi: 3.0.3
info:
  title: Domino Public API
  description: Domino Public API Endpoints
  version: cloud
servers: []
security:
  - DominoApiKey: []
  - BearerAuthentication: []
tags:
  - name: AIGateway
  - name: AppInstances
  - name: AppVersions
  - name: Apps
  - name: AsyncPredictions
  - name: AuditTrail
  - name: BillingTag
  - name: BillingTagSettings
  - name: Cost
  - name: CustomMetrics
  - name: DataSource
  - name: DatasetRw
  - name: DeploymentTargets
  - name: Environments
  - name: Extensions
  - name: GenAI
  - name: HardwareTier
  - name: Jobs
  - name: ModelAPI
  - name: ModelAPIVersion
  - name: ModelDeployment
  - name: Organizations
  - name: PPM
  - name: PersonalAccessToken
  - name: ProjectSharedDatasets
  - name: ProjectTemplates
  - name: Projects
  - name: ProjectsCommits
  - name: ProjectsFiles
  - name: RegisteredModels
  - name: ServiceAccounts
  - name: Users
  - name: Workspaces
paths:
  /api/projects/v1/projects/{projectId}/repositories:
    post:
      tags:
        - Projects
      summary: Add an imported git repository to this project
      description: >-
        Add an imported git repository to this project. Required permissions:
        `ChangeProjectSettings`
      operationId: addRepoToProject
      parameters:
        - description: Project ID
          in: path
          name: projectId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewProjectGitRepositoryV1'
        description: Repository to add
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectGitRepositoryEnvelopeV1'
          description: Success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    NewProjectGitRepositoryV1:
      properties:
        defaultRef:
          $ref: '#/components/schemas/ProjectRepositoryReferenceV1'
        gitCredentialId:
          description: >-
            Id of the git creds to use for the repo. Credentials only apply for
            the current user, and other users will need to add their own unique
            creds.
          type: string
        name:
          description: Optional name of the repository in the project
          type: string
        serviceProvider:
          $ref: '#/components/schemas/GitServiceProviderV1'
        uri:
          description: URI of the repository origin
          example: https://github.com/torvalds/linux
          type: string
      required:
        - uri
      type: object
    ProjectGitRepositoryEnvelopeV1:
      properties:
        metadata:
          $ref: '#/components/schemas/MetadataV1'
        repository:
          $ref: '#/components/schemas/ProjectGitRepositoryV1'
      required:
        - repository
        - metadata
      type: object
    ProjectRepositoryReferenceV1:
      properties:
        refType:
          $ref: '#/components/schemas/GitReferenceTypeV1'
        value:
          type: string
      required:
        - refType
      type: object
    GitServiceProviderV1:
      description: Git service provider
      enum:
        - bitbucket
        - bitbucketServer
        - github
        - githubEnterprise
        - gitLab
        - gitLabEnterprise
        - unknown
      type: string
    MetadataV1:
      properties:
        notices:
          description: Notices relating to the request
          items:
            type: string
          type: array
        requestId:
          type: string
      required:
        - requestId
        - notices
      type: object
    ProjectGitRepositoryV1:
      properties:
        defaultRef:
          $ref: '#/components/schemas/ProjectRepositoryReferenceV1'
        id:
          description: Id of the repository
          example: 62604702b7e5d347dbe7a908
          type: string
        name:
          description: >-
            Optional name of the repository in the project. If not provided, a
            name will be inferred from the URL
          type: string
        serviceProvider:
          $ref: '#/components/schemas/GitServiceProviderV1'
        uri:
          description: URI of the repository origin
          example: https://github.com/torvalds/linux
          type: string
      required:
        - id
        - uri
        - defaultRef
        - serviceProvider
      type: object
    FailureEnvelopeV1:
      properties:
        errors:
          description: Errors that caused a request to fail
          items:
            type: string
          type: array
        requestId:
          description: Id used to correlate a request with server actions.
          example: bbd78579-93c4-45ee-a983-0d5c8da6d5b1
          type: string
      required:
        - requestId
        - errors
      type: object
    GitReferenceTypeV1:
      enum:
        - head
        - branch
        - tag
        - commit
      type: string
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Bad Request
    '401':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: >-
        The current user cannot perform this operation because they are not
        logged in
    '403':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: The current user is not authorized to perform this operation
    '404':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Not Found
    '500':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Internal Server Error
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````