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

# Get a scan by ID

> Retrieves detailed information about a specific scan including status, progress, and configuration.



## OpenAPI

````yaml get /project/{projectId}/scan/{scanId}
openapi: 3.0.0
info:
  title: Cybedefend API
  description: >-
    CybeDefend is an advanced API for application security analysis. Key
    features include OAuth 2.0 authentication, user/organization/project
    management, and REBAC-based permissions. It excels in static, dynamic, and
    IaC security analyses (SAST, DAST, IaC, etc.).
  version: '1.0'
  contact: {}
servers:
  - url: https://api-eu.cybedefend.com
    description: EU
  - url: https://api-us.cybedefend.com
    description: US
security: []
tags: []
paths:
  /project/{projectId}/scan/{scanId}:
    get:
      tags:
        - Scan
      summary: Get a scan by ID
      description: >-
        Retrieves detailed information about a specific scan including status,
        progress, and configuration.
      operationId: ScanController_getScan
      parameters:
        - name: projectId
          required: true
          in: path
          description: The unique identifier of the project
          schema:
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440000
            type: string
        - name: scanId
          required: true
          in: path
          description: The unique identifier of the scan
          schema:
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440001
            type: string
      responses:
        '200':
          description: Scan details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                example:
                  message: Unauthorized
                  statusCode: 401
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                example:
                  message: Forbidden
                  statusCode: 403
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
components:
  schemas:
    ScanResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Scan unique identifier
          format: uuid
        name:
          type: string
          description: Name of the scan
        state:
          type: string
          description: Current scan state
          enum:
            - queued
            - running
            - completed
            - failed
        language:
          description: Array of detected or target languages
          type: array
          items:
            type: string
        projectId:
          type: string
          description: Project unique identifier
          format: uuid
        private:
          type: boolean
          description: Define if the scan is private
        initializerUserId:
          type: string
          description: User ID who initialized the scan
          format: uuid
        createAt:
          type: string
          description: Creation date of the scan
          format: date-time
        updatedAt:
          type: string
          description: Last update date of the scan
          format: date-time
        scanType:
          type: string
          description: Scan type (optional)
        startTime:
          format: date-time
          type: string
          description: Date and time when the scan started
        endTime:
          format: date-time
          type: string
          description: Date and time when the scan ended
        containers:
          type: array
          items:
            $ref: '#/components/schemas/ContainerDto'
        progress:
          type: number
          description: Progress of the scan in percentage (0-100)
        step:
          type: string
          description: Current step of the scan
        vulnerabilityDetected:
          type: number
          description: Number of vulnerabilities detected (optional)
        errorMessage:
          type: string
          description: Error message when scan fails
        errorCode:
          type: number
          description: >-
            Exit code from the scanner (see scanlink-error-codes.ts for
            reference)
        errorCategory:
          type: string
          description: >-
            Error category: authentication, cloud_provider, network, scan, api,
            unknown
      required:
        - id
        - name
        - state
        - language
        - projectId
        - private
        - createAt
        - updatedAt
        - containers
        - progress
        - step
    ErrorDto:
      type: object
      properties:
        timestamp:
          type: string
          example: '2025-02-18T12:31:18.491Z'
          description: Timestamp of the error
        service:
          type: string
          example: AiService
          description: Name of the service where the error occurred
        method:
          type: string
          example: startConversation
          description: Method name where the error occurred
        message:
          type: string
          example: Invalid parameters provided
          description: Error message
        code:
          type: number
          example: 400
          description: HTTP status code
          minimum: 100
          maximum: 599
      required:
        - timestamp
        - service
        - method
        - message
        - code
    ContainerDto:
      type: object
      properties: {}

````