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

# List repositories

> List repositories from all connected providers.

Returns every repository across all of your connected providers (GitHub, GitLab, and Bitbucket), including whether automatic pull-request scans are enabled for each one.

Use this endpoint to discover the repositories available to your organization before triggering a [scan](/api-reference/scans/create-scan) or [cost estimation](/api-reference/cost-estimations/create-cost-estimation), and to confirm which repositories have PR scanning turned on.

<Info>**Scope required**: `read`</Info>


## OpenAPI

````yaml openapi.json GET /repos
openapi: 3.0.0
info:
  title: Hacktron REST API
  description: Public REST API for programmatic access to Hacktron
  version: '1.0'
  contact: {}
servers:
  - url: https://api.hacktron.ai/v1
security:
  - api-key: []
tags: []
paths:
  /repos:
    get:
      tags:
        - REST API - Repos
      summary: >-
        List repositories from all connected providers, including whether PR
        scans are enabled
      operationId: RestRepoController_list
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MergedReposResponseDto'
components:
  schemas:
    MergedReposResponseDto:
      type: object
      properties:
        repos:
          description: Unified list of repositories from all providers
          type: array
          items:
            $ref: '#/components/schemas/UnifiedRepoDto'
        errors:
          description: Providers that failed to respond
          example: []
          type: array
          items:
            type: string
      required:
        - repos
        - errors
    UnifiedRepoDto:
      type: object
      properties:
        id:
          type: string
          description: Internal UUID
          example: 123e4567-e89b-12d3-a456-426614174000
        provider:
          type: string
          description: Source provider
          enum:
            - github
            - gitlab
            - bitbucket
          example: github
        name:
          type: string
          description: >-
            Display name (owner/repo for GitHub, namespace/project for GitLab,
            workspace/slug for Bitbucket)
          example: octocat/Hello-World
        providerKey:
          type: string
          description: >-
            Provider-native identifier for mutation endpoints. GitHub:
            owner/repo, GitLab: numeric projectId (as string), Bitbucket:
            repository UUID.
          example: octocat/Hello-World
        enabled:
          type: boolean
          description: Whether the repository is enabled for scanning
          example: true
        threatModelUpdatedAt:
          type: string
          nullable: true
          description: >-
            ISO timestamp of the repo's most recent threat_model.md update, or
            null if it has none. Repos are returned ordered by this (most recent
            first; repos without a threat model last).
          example: '2026-06-22T12:00:00.000Z'
        prScansEnabled:
          type: boolean
          description: Whether PR/MR scans are enabled (GitHub and GitLab)
          example: true
        prScanBranches:
          description: Target branch patterns for PR/MR scans (GitHub and GitLab)
          example:
            - main
            - '**/release/**'
          type: array
          items:
            type: string
        installationId:
          type: number
          description: GitHub App installation ID (GitHub only)
          example: 12345678
        baseUrl:
          type: string
          nullable: true
          description: >-
            GitHub Enterprise base URL for self-hosted (PAT) installations.
            Null/absent for github.com. Clients should build clone/display URLs
            from this host instead of assuming github.com (GitHub only).
          example: https://ghe.example.com
        defaultBranch:
          type: string
          description: Default branch (GitLab only)
          example: main
        visibility:
          type: string
          description: Project visibility (GitLab only)
          example: private
        webhookRegistered:
          type: boolean
          description: Whether a webhook is registered for this project (GitLab only)
          example: true
        isPrivate:
          type: boolean
          description: Whether the repository is private (Bitbucket only)
          example: true
      required:
        - id
        - provider
        - name
        - providerKey
        - enabled
        - threatModelUpdatedAt
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-Api-Key

````