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

# Get the app's linked repository

> Returns the repository linked to an app and its deploy settings. Team permission: `operate` or `manage`.



## OpenAPI

````yaml /spec/paas-git-oneclick.yaml get /v1/projects/{projectID}/git-repository-integration/{provider}
openapi: 3.0.1
info:
  title: Git Integration & One-Click Apps
  version: 1.0.0
  description: |
    Connect your GitHub account, link a repository to an app so it deploys
    automatically, and browse the one-click app catalog.

    ## Connecting GitHub

    Git integration has two parts:

    1. **Your GitHub account.** Connect it with
       `GET /v1/git-provider-integration/github` (sign in on GitHub) and
       `POST /v1/git-provider-integration/github`.
    2. **The Liara GitHub app,** installed on your GitHub account or
       organization to give access to repositories. Get the installation link
       with `GET /v1/git-repository-integration/github/connect`.

    Then link a repository to an app with
    `POST /v1/projects/{projectID}/git-repository-integration/github`. To see
    what's connected, use `GET /v1/me/git-integrations` (in Authentication &
    Account).

    `github` is currently the only supported `provider`. Git connections
    belong to you, not to a team. With `teamID`, the app-level endpoints use
    your own GitHub connection on the team's app.
servers:
  - url: https://api.liara.ir
security:
  - bearerAuth: []
tags:
  - name: GitHub Account
    description: Connect and disconnect your GitHub account.
  - name: Repositories
    description: Install the GitHub app, and list repositories, branches and organizations.
  - name: App Repository
    description: Link a repository to an app and deploy from it.
  - name: One-Click Apps
    description: Browse ready-to-deploy apps.
paths:
  /v1/projects/{projectID}/git-repository-integration/{provider}:
    get:
      tags:
        - App Repository
      summary: Get the app's linked repository
      description: >-
        Returns the repository linked to an app and its deploy settings. Team
        permission: `operate` or `manage`.
      operationId: getAppRepository
      parameters:
        - $ref: '#/components/parameters/TeamID'
        - $ref: '#/components/parameters/AppID'
        - $ref: '#/components/parameters/Provider'
      responses:
        '200':
          description: The linked repository.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectedRepository'
              example:
                _id: '000000000000000000000190'
                project: '000000000000000000000050'
                providerIntegration: '000000000000000000000004'
                repositoryIntegration: '000000000000000000000005'
                metaData:
                  id: 300000000
                  node_id: <node-id>
                  name: my-repo
                  full_name: your-github-username/my-repo
                  private: true
                settings:
                  branches:
                    - main
                  checkSuite: false
                  autoDeploy: true
                createdAt: '2026-01-01T08:00:00.000Z'
                updatedAt: '2026-01-01T08:00:00.000Z'
        '400':
          $ref: '#/components/responses/ValidationOrTeamIDError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/TeamForbidden'
        '404':
          description: >-
            The app doesn't exist (`project_not_found`) or has no linked
            repository (`repository_not_found`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 404
                error: Not Found
                message: Repository not found.
                data:
                  code: repository_not_found
components:
  parameters:
    TeamID:
      name: teamID
      in: query
      required: false
      description: >-
        Run the request in the context of a team you belong to, instead of your
        personal account.
      schema:
        $ref: '#/components/schemas/ObjectID'
      example: '000000000000000000000002'
    AppID:
      name: projectID
      in: path
      required: true
      description: The app's ID (`_id`).
      schema:
        $ref: '#/components/schemas/ObjectID'
      example: '000000000000000000000050'
    Provider:
      name: provider
      in: path
      required: true
      description: The git provider.
      schema:
        type: string
        enum:
          - github
  schemas:
    ConnectedRepository:
      type: object
      properties:
        _id:
          type: string
          description: The link's ID (`connectedRepositoryID`).
        project:
          type: string
          description: The app's ID.
        providerIntegration:
          type: string
          description: ID of the GitHub account connection used.
        repositoryIntegration:
          type: string
          description: ID of the GitHub app installation used.
        metaData:
          $ref: '#/components/schemas/RepositoryInfo'
        settings:
          $ref: '#/components/schemas/RepositorySettings'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      description: Standard error body.
      properties:
        statusCode:
          type: integer
        error:
          type: string
          description: HTTP status text.
        message:
          type: string
          description: What went wrong.
        data:
          type: object
          nullable: true
          description: >-
            Extra details. When present, `code` is a stable, machine-readable
            error code.
          properties:
            code:
              type: string
    ObjectID:
      type: string
      pattern: ^[0-9a-fA-F]{24}$
      description: 24-character hexadecimal ID.
    RepositoryInfo:
      type: object
      properties:
        id:
          type: integer
          description: GitHub's repository ID.
        node_id:
          type: string
        name:
          type: string
        full_name:
          type: string
          description: The repository as `owner/name`.
        private:
          type: boolean
    RepositorySettings:
      type: object
      required:
        - branches
      properties:
        branches:
          type: array
          maxItems: 1
          description: The branch to deploy from (exactly one).
          items:
            type: string
        autoDeploy:
          type: boolean
          default: true
          description: Deploy new commits on the branch automatically.
        checkSuite:
          type: boolean
          default: false
          description: Wait for the commit's checks on GitHub to finish before deploying.
    AuthError:
      type: object
      description: Error body returned when the API token is rejected.
      properties:
        error:
          type: string
  responses:
    ValidationOrTeamIDError:
      description: >-
        The request is invalid (`message` says which field failed), or `teamID`
        isn't a valid ID.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            error: Bad Request
            message: Invalid team ID.
            data: null
    Unauthorized:
      description: The API token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthError'
          example:
            error: Unauthorized.
    TeamForbidden:
      description: >-
        With `teamID`: you aren't a member of the team (`team_not_found`), or
        you don't have the required permission on this app (`no_permission`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 403
            error: Forbidden
            message: You do not have permission to access this resource.
            data:
              code: no_permission
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your API token as `Authorization: Bearer <api-token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.