> ## 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 a failed automatic deployment

> Explains why an automatic deployment from a linked repository failed. The IDs come from the failure link shown on the commit in GitHub. Team permission: `operate` or `manage`.



## OpenAPI

````yaml /spec/paas-git-oneclick.yaml get /v1/projects/{project_id}/repository-deployment-failures/{connectedRepositoryID}/{repositoryDeploymentFailureID}
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/{project_id}/repository-deployment-failures/{connectedRepositoryID}/{repositoryDeploymentFailureID}:
    get:
      tags:
        - App Repository
      summary: Get a failed automatic deployment
      description: >-
        Explains why an automatic deployment from a linked repository failed.
        The IDs come from the failure link shown on the commit in GitHub. Team
        permission: `operate` or `manage`.
      operationId: getRepositoryDeploymentFailure
      parameters:
        - $ref: '#/components/parameters/TeamID'
        - name: project_id
          in: path
          required: true
          description: The app's name.
          schema:
            type: string
          example: my-app
        - name: connectedRepositoryID
          in: path
          required: true
          description: The linked repository's `_id`.
          schema:
            $ref: '#/components/schemas/ObjectID'
        - name: repositoryDeploymentFailureID
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/ObjectID'
      responses:
        '200':
          description: The failure.
          content:
            application/json:
              schema:
                type: object
                properties:
                  project:
                    type: string
                    description: The app's name.
                  repository:
                    type: string
                    description: The repository as `owner/name`.
                  message:
                    type: string
                    description: Why the deployment failed.
                  gitInfo:
                    type: object
                    description: The commit that was being deployed.
                  state:
                    type: string
                    enum:
                      - failure
                      - inactive
              example:
                project: my-app
                repository: your-github-username/my-repo
                message: >-
                  An error occurred during deployment. please create a ticket in
                  the liara.
                gitInfo:
                  branch: main
                  commit: <commit-sha>
                state: failure
        '400':
          $ref: '#/components/responses/ValidationOrTeamIDError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/TeamForbidden'
        '404':
          description: >-
            The app (`project_not_found`), linked repository
            (`connected_repository_not_found`) or failure
            (`repository_deployment_failure_not_found`) doesn't exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
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'
  schemas:
    ObjectID:
      type: string
      pattern: ^[0-9a-fA-F]{24}$
      description: 24-character hexadecimal ID.
    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
    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.