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

# Get a build

> Retrieves details about a specific Build



## OpenAPI

````yaml https://api.qlty.sh/openapi.json get /gh/{ownerKeyOrId}/projects/{projectKeyOrId}/builds/{buildId}
openapi: 3.1.0
info:
  title: Qlty API
  version: 1.0.0
  description: >-
    The Qlty API is organized around REST. It provides predictable,
    resource-oriented URLs, accepts JSON-encoded request bodies, and returns
    JSON-encoded responses.
servers:
  - url: https://api.qlty.sh
security:
  - Bearer: []
tags:
  - name: Service
    description: Service status and API discovery operations
  - name: User
    description: Operations for the authenticated user
  - name: Workspaces
    description: Operations for managing workspaces
  - name: Projects
    description: Operations for managing projects
  - name: Issues
    description: Operations for managing issues
  - name: Builds
    description: Operations for retrieving builds
  - name: Metrics
    description: Operations for retrieving metrics
  - name: Components
    description: Operations for retrieving components
  - name: Applications
    description: Operations for managing applications, which group a workspace's projects
  - name: Coverage
    description: Operations for retrieving code coverage data
paths:
  /gh/{ownerKeyOrId}/projects/{projectKeyOrId}/builds/{buildId}:
    get:
      tags:
        - Builds
      summary: Get a build
      description: Retrieves details about a specific Build
      operationId: getBuild
      parameters:
        - schema:
            type: string
            minLength: 3
            example: acme-corp
            description: Repository owner name (login) or workspace ID
          required: true
          description: Repository owner name (login) or workspace ID
          name: ownerKeyOrId
          in: path
        - schema:
            type: string
            minLength: 3
            example: my-repo
            description: Repository name or project ID
          required: true
          description: Repository name or project ID
          name: projectKeyOrId
          in: path
        - schema:
            type: string
            minLength: 3
            example: 550e8400-e29b-41d4-a716-446655440000
            description: Build ID
          required: true
          description: Build ID
          name: buildId
          in: path
      responses:
        '200':
          description: Retrieve the build
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Build'
              example:
                id: 550e8400-e29b-41d4-a716-446655440000
                type: analysis
                status: succeeded
                branchName: main
                commitSha: 9c9a4c4a1e6bb01b2fbd7f5e1c0b4a2d3e5f6a7b
                commitMessage: Fix the bug
                submittedAt: '2026-01-01T12:00:00Z'
                finishedAt: '2026-01-01T12:01:35Z'
                queueSeconds: 5
                statusReason: null
                conclusion: succeeded
                exitCode: 0
                source: github_push
                pullRequestNumber: null
                committerLogin: octocat
                startedAt: '2026-01-01T12:00:05Z'
                executionSeconds: 90
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Build:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        type:
          type: string
          enum:
            - analysis
            - format
            - ssh
            - coverage_setup
          example: analysis
        status:
          type: string
          enum:
            - submitted
            - starting
            - running
            - succeeded
            - failed
            - skipped
            - rejected
          example: succeeded
          description: Most recent status reported for the build
        branchName:
          type: string
          nullable: true
          example: main
        commitSha:
          type: string
          nullable: true
          example: 9c9a4c4a1e6bb01b2fbd7f5e1c0b4a2d3e5f6a7b
        commitMessage:
          type: string
          nullable: true
          example: Fix the bug
        submittedAt:
          type: string
          format: date-time
          example: '2026-01-01T12:00:00Z'
        finishedAt:
          type: string
          nullable: true
          format: date-time
          example: '2026-01-01T12:01:35Z'
        queueSeconds:
          type: integer
          nullable: true
          example: 5
        statusReason:
          type: string
          nullable: true
          example: null
          description: Explanation for the current status, when one was reported
        conclusion:
          type: string
          nullable: true
          enum:
            - succeeded
            - failed
          example: succeeded
          description: Terminal outcome, or null while the build is unfinished
        exitCode:
          type: integer
          nullable: true
          example: 0
        source:
          type: string
          nullable: true
          example: github_push
        pullRequestNumber:
          type: integer
          nullable: true
          example: 42
        committerLogin:
          type: string
          nullable: true
          example: octocat
        startedAt:
          type: string
          nullable: true
          format: date-time
          example: '2026-01-01T12:00:05Z'
        executionSeconds:
          type: integer
          nullable: true
          example: 90
      required:
        - id
        - type
        - status
        - branchName
        - commitSha
        - commitMessage
        - submittedAt
        - finishedAt
        - queueSeconds
        - statusReason
        - conclusion
        - exitCode
        - source
        - pullRequestNumber
        - committerLogin
        - startedAt
        - executionSeconds
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                example: '400'
              title:
                type: string
                example: Bad Request
              detail:
                type: string
                example: The request was invalid.
            required:
              - status
              - title
              - detail
      required:
        - errors
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      description: Generate an API token at https://qlty.sh/user/settings/tokens

````