> ## 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.

# List projects

> Retrieves a list of Projects associated with a Workspace, ordered by key. Supports JSON, newline-delimited JSON (`application/x-ndjson`), and CSV (`text/csv`) response formats via the `Accept` header. Pass `include=metrics` to get every Project's metrics with one paged call instead of one call per Project.



## OpenAPI

````yaml https://api.qlty.sh/openapi.json get /gh/{ownerKeyOrId}/projects
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
  - name: Pull Requests
    description: Operations for retrieving pull request coverage
paths:
  /gh/{ownerKeyOrId}/projects:
    get:
      tags:
        - Projects
      summary: List projects
      description: >-
        Retrieves a list of Projects associated with a Workspace, ordered by
        key. Supports JSON, newline-delimited JSON (`application/x-ndjson`), and
        CSV (`text/csv`) response formats via the `Accept` header. Pass
        `include=metrics` to get every Project's metrics with one paged call
        instead of one call per Project.
      operationId: listProjects
      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: integer
            minimum: 1
            maximum: 100
            example: 20
            description: Maximum number of items to return (1-100)
          required: false
          description: Maximum number of items to return (1-100)
          name: page[limit]
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            example: 0
            description: Number of items to skip
          required: false
          description: Number of items to skip
          name: page[offset]
          in: query
        - schema:
            type: string
            enum:
              - metrics
            example: metrics
            description: >-
              Set to `metrics` to add each Project's latest default-branch
              metrics.
          required: false
          description: >-
            Set to `metrics` to add each Project's latest default-branch
            metrics.
          name: include
          in: query
        - schema:
            type: string
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440001
            description: Return only Projects assigned to this Application
          required: false
          description: Return only Projects assigned to this Application
          name: filter[applicationId]
          in: query
      responses:
        '200':
          description: List all projects for the owner
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectList'
              example:
                data:
                  - id: 85fae897-5a48-483b-ad29-1852c0db1707
                    workspaceId: 1c47b6fd-db56-4fbd-9cf0-4d88f9631050
                    providerUrl: https://github.com/acmeco/awesome-project
                    key: awesome-project
                    workspaceKey: acmeco
                    applicationId: null
                meta:
                  hasMore: false
            application/x-ndjson:
              schema:
                type: string
                description: Newline-delimited JSON (NDJSON) format
                example: >-
                  {"id":"550e8400-e29b-41d4-a716-446655440000","workspaceId":"ws_abc123","providerUrl":"https://github.com/acme-corp/my-repo","key":"my-repo","workspaceKey":"acme-corp","applicationId":"550e8400-e29b-41d4-a716-446655440001"}
            text/csv:
              schema:
                type: string
                description: >-
                  CSV format with header row. With `include=metrics`, a column
                  for each metric key follows.
                example: >-
                  id,workspaceId,providerUrl,key,workspaceKey,applicationId

                  550e8400-e29b-41d4-a716-446655440000,ws_abc123,https://github.com/acme-corp/my-repo,my-repo,acme-corp,550e8400-e29b-41d4-a716-446655440001
        '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:
    ProjectList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ProjectListItem'
        meta:
          type: object
          properties:
            hasMore:
              type: boolean
              example: true
              description: Whether there are more items available beyond this page
          required:
            - hasMore
      required:
        - data
        - meta
    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
    ProjectListItem:
      allOf:
        - $ref: '#/components/schemas/Project'
        - type: object
          properties:
            analyzedAt:
              type: string
              nullable: true
              format: date-time
              example: '2026-01-09T12:00:00Z'
              description: >-
                Present with `include=metrics`: when the latest analysis of the
                default branch ran (RFC 3339, UTC). Null when the Project has no
                analysis.
            coverageUploadedAt:
              type: string
              nullable: true
              format: date-time
              example: '2026-01-09T12:04:31Z'
              description: >-
                Present with `include=metrics`: when Qlty recorded the default
                branch's latest coverage upload (RFC 3339, UTC). Null when the
                default branch has no coverage.
            metrics:
              type: array
              items:
                $ref: '#/components/schemas/Metric'
              description: >-
                Present with `include=metrics`: the Project's latest
                default-branch metrics, in the same form as the project metrics
                endpoint. Empty when the Project has no metrics yet.
    Project:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        workspaceId:
          type: string
          example: ws_abc123
        providerUrl:
          type: string
          example: https://github.com/acme-corp/my-repo
          description: URL to the repository on the provider
        key:
          type: string
          example: my-repo
          description: Repository name
        workspaceKey:
          type: string
          example: acme-corp
          description: Key of the workspace this project belongs to
        applicationId:
          type: string
          nullable: true
          example: 550e8400-e29b-41d4-a716-446655440001
          description: >-
            ID of the Application this project is assigned to, or null when
            unassigned
      required:
        - id
        - workspaceId
        - providerUrl
        - key
        - workspaceKey
        - applicationId
    Metric:
      allOf:
        - $ref: '#/components/schemas/MetricDescriptor'
        - type: object
          properties:
            value:
              oneOf:
                - type: number
                - type: string
                  enum:
                    - XS
                    - S
                    - M
                    - L
                    - XL
                - type: string
                  enum:
                    - A
                    - B
                    - C
                    - D
                    - F
              example: 42
              description: The latest value of the metric
          required:
            - value
    MetricDescriptor:
      type: object
      properties:
        key:
          type: string
          example: CMPLX
          description: >-
            One of the keys described in `MetricKey`, or `DCOV` (Diff Coverage:
            line coverage of the lines a pull request added or modified), which
            only pull request coverage returns
        name:
          type: string
          example: Cognitive Complexity
        description:
          type: string
          example: Measures how hard the code is to understand
        category:
          type: string
          enum:
            - maintainability
            - reliability
            - security
            - size
            - coverage
            - quality
          example: maintainability
        inverted:
          type: boolean
          example: true
          description: When true, higher values are worse
        valueType:
          type: string
          enum:
            - number
            - percentage
            - grade
            - size
            - duration
            - count
          example: number
          description: How the metric's value should be interpreted
      required:
        - key
        - name
        - category
        - inverted
        - valueType
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      description: Generate an API token at https://qlty.sh/user/settings/tokens

````

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