---
title: "Listar repositorios"
method: GET
path: "/tools/v1/repositories"
---

# Listar repositorios

`GET /tools/v1/repositories`

## Request

- Base URL: `https://api.qualityclouds.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.qualityclouds.ai/tools/v1/repositories`
- Auth: one of:
  - HTTP bearer
  - OpenID Connect (`https://account.qualityclouds.com//realms/ai-production/.well-known/openid-configuration`)

Devuelve los repositorios accesibles según las organizaciones del token. El query **include** permite enriquecer cada elemento con datos relacionados.

## Query parameters

- `include` string, nullable: Tokens separados por coma (ej. `scan,inventory,stack_profile,active_api_keys,active_schedule,agent_metrics`). Cada token añade datos opcionales a **cada** ítem de `repositories`: | Valor | Efecto | |-------|--------| | `scan` | Último scan del repositorio (cualquier status). | | `last_success_scan` | Último scan con status SUCCESS o PARTIAL. | | `inventory` | Snapshot legacy (inventario de tools) asociado al repo. | | `stack_profile` | Perfil curado (`stack_profiles`) ligado por `repositories.stack_profile_id`. | | `active_api_keys` | API keys no revocadas y no expiradas. | | `active_schedule` | Schedule de scan activo del repositorio. | | `agent_metrics` | KPIs de agentes inactivos del repo (QSA-927, ADR-017). | Los valores se pueden combinar en cualquier orden.
- `search` string, nullable: Filtro RSQL opcional. Operador soportado: `==`. Campos disponibles: `workspace_id`. Ejemplo: `?search=workspace_id==3fa85f64-5717-4562-b3fc-2c963f66afa6`

## Response `200`

Lista de repositorios; los campos opcionales dependen del parámetro `include`.

- ListRepositoriesResponse
  - `repositories` RepositoryItem[], required
    - `id` string, required
    - `name` string, required
    - `url` string, required
    - `is_stack_profile_selectable` boolean, required: True while stack_profile_locked_at is NULL (ADR-010 FE signal).
    - `is_demo` boolean: True for the shared, read-only demo repository (QSA-1244).
    - `user_uuid` string, nullable
    - `platform_code` string, nullable
    - `org_uuid` string, nullable
    - `branch` string, nullable
    - `git_flavor` string, nullable
    - `workspace_id` string, nullable
    - `scan` LatestScanNode
      - `scan_id` string, required
      - `status` string, required
      - `start` string, nullable
      - `end` string, nullable
      - `duration_minutes` integer, nullable
      - `branch_name` string, nullable
      - `error_details` string, nullable
      - `error_on` string, nullable
    - `last_success_scan` LatestScanNode
      - `scan_id` string, required
      - `status` string, required
      - `start` string, nullable
      - `end` string, nullable
      - `duration_minutes` integer, nullable
      - `branch_name` string, nullable
      - `error_details` string, nullable
      - `error_on` string, nullable
    - `inventory` InventoryNode: Legacy tools-inventory snapshot linked to the repo (not curated stack_profiles).
      - `id` string, required
      - `name` string, required
      - `version` string, required
      - `description` string, nullable
    - `stack_profile` CuratedStackProfileNode: Curated stack_profiles row bound via repositories.stack_profile_id.
      - `id` string, uuid, required
      - `name` string, required
      - `scope_type` 'global' | 'org' | 'workspace' | 'project', required: Four-level scope hierarchy for curated stack profiles.
      - `is_default` boolean, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
      - `description` string, nullable
      - `parent_id` string, uuid, nullable
      - `created_by` string, nullable
      - `org_id` string, uuid, nullable
      - `workspace_id` string, uuid, nullable
      - `repository_id` string, nullable
    - `api_keys` ApiKeyListItem[], nullable: Presente solo si `include` contiene `active_api_keys`. API keys del repositorio no revocadas y no expiradas; mismo modelo que GET /api-keys.
      - `api_key_id` string, required
      - `target_type` 'repository' | 'connection'
      - `repository_id` integer, nullable
      - `connection_id` string, nullable
      - `repository_name` string
      - `repository_url` string
      - `name` string, nullable
      - `expires_at` string, date-time, required
      - `created_at` string, date-time, required
      - `is_revoked` boolean, required
      - `last_four` string, required
      - `mcp_connections` McpConnectionItem[]
        - `client_info_name` string, nullable
        - `client_info_version` string, nullable
        - `last_connection` string, date-time, nullable
    - `active_schedule` ActiveScheduleNode
      - `id` string, uuid, required
      - `timing` ActiveScheduleTimingNode, required
        - `frequency_weeks` integer, required
        - `day_of_week` integer, required
        - `local_time` string, required
        - `timezone` string, required
      - `active` boolean, required
      - `next_run_at` string, date-time, required
      - `consecutive_failures` integer, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
    - `agent_metrics` ToolsApiSrcApplicationResponsesRepositoryResponseAgentMetricsNode: KPIs about inactive agents for the repository (QSA-927, ADR-017). Present only when `include` contains `agent_metrics`. See the technical design "Inactive-Agent KPIs per Repository" for the operational definition.
      - `num_inactive_agents` integer, required: Count of agents available to the user for this repository that are not active in the repository's stack profile.
      - `sum_rules_inactive_agents` integer, required: Sum of `agent_built_tool.num_rules` across the inactive agents. 0 when the set is empty.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Validation Error

---

[API](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api.md) · [All operations](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api/revisions/250c849925af?raw)
