---
title: "Scan Repository V3"
method: POST
path: "/api/v3/scan"
tags: ["scan-v3"]
---

# Scan Repository V3

`POST /api/v3/scan`

## 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/api/v3/scan`
- Auth: one of:
  - HTTP bearer
  - OpenID Connect (`https://account.qualityclouds.com//realms/ai-production/.well-known/openid-configuration`)

Endpoint v3 para escanear un repositorio con validaciones de tools

Args:
    body (ScanV3Body): Request con repository_id y tool_ids
    authenticated_user (AuthenticatedUser): Usuario autenticado
    tools_repo: Repositorio de tools
    repositories_repo: Repositorio de repositorios
    handler: Handler para procesar el scan v3
    credentials: Credenciales de autorización
    
Returns:
    ScanV3Response: el scan creado (status, message, repository_id, tool_ids, scan_id)

## Request body

- ScanV3Body
  - `repository_id` integer, required
  - `tool_ids` string[], required
  - `scan_id` string, nullable: Parámetro opcional para debugging

## Response `200`

Successful Response

- ScanV3Response: The body ``POST /api/v3/scan`` answers with when the scan starts. Not a variant of ``ScanResponse`` above: v3 reports the tools the scan was started for and carries no timestamp. Declared so the shape the endpoint has always returned appears in the OpenAPI document -- the Hub generates its client from it -- instead of living only inside the controller function. Attributes: status (str): "success" when the scan was created message (str): Human-readable result repository_id (int): Repository the scan was started for tool_ids (list[str]): Tools the scan will run scan_id (str): Identifier to poll the scan with scan_status (str): RUNNING when the scan started, QUEUED when it waits for a free scan slot and starts on its own later (QSA-1829)
  - `status` string, required
  - `message` string, required
  - `repository_id` integer, required
  - `tool_ids` string[], required
  - `scan_id` string, required
  - `scan_status` 'RUNNING' | 'QUEUED'

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