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

# List Security Issue Groups for a Scan

> Retrieve a scan's security issues collapsed into groups with a count per group, so a client can render a summary without downloading every issue. Accepts the same filters as GET /scan/{scan_id}/issues.



## OpenAPI

````yaml /api-reference/openapi.json get /scan/{scan_id}/issues/groups
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: >-
    API for interacting with Corgea's scanning and vulnerability management
    features
servers:
  - url: https://www.corgea.app/api/v1
    description: Production server
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /scan/{scan_id}/issues/groups:
    get:
      tags:
        - Issues
        - Scans
      summary: List Security Issue Groups for a Scan
      description: >-
        Retrieve a scan's security issues collapsed into groups with a count per
        group, so a client can render a summary without downloading every issue.
        Accepts the same filters as GET /scan/{scan_id}/issues.
      operationId: listSecurityIssueGroupsForScan
      parameters:
        - name: scan_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The scan to group issues for
        - name: group_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - cwe
              - file_path
            default: cwe
          description: >-
            How to group the issues. cwe groups by CWE classification, file_path
            groups by the exact file each issue was found in.
          example: file_path
        - name: breakdown
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Include per-urgency and per-status counts on each group
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: The page number for pagination
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            default: 20
            maximum: 100
          description: The number of groups per page
      responses:
        '200':
          description: Issue groups retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  page:
                    type: integer
                  total_pages:
                    type: integer
                  total_groups:
                    type: integer
                  groups:
                    type: array
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/IssueCweGroup'
                        - $ref: '#/components/schemas/IssueFileGroup'
        '400':
          description: Invalid group_by value
        '404':
          description: Scan not found
components:
  schemas:
    IssueCweGroup:
      type: object
      description: >-
        A group of issues sharing a CWE classification, returned when group_by
        is cwe.
      properties:
        cwe:
          type: object
          properties:
            id:
              type: string
              example: CWE-89
            name:
              type: string
            description:
              type: string
        issue_count:
          type: integer
          example: 42
        breakdown:
          $ref: '#/components/schemas/IssueGroupBreakdown'
    IssueFileGroup:
      type: object
      description: >-
        A group of issues sharing a file path, returned when group_by is
        file_path.
      properties:
        file:
          type: object
          properties:
            path:
              type: string
              example: src/api/auth.py
            name:
              type: string
              example: auth.py
        issue_count:
          type: integer
          example: 7
        breakdown:
          $ref: '#/components/schemas/IssueGroupBreakdown'
    IssueGroupBreakdown:
      type: object
      description: Counts within the group, present only when breakdown is true.
      properties:
        by_urgency:
          type: object
          additionalProperties:
            type: integer
          example:
            CR: 5
            HI: 10
            ME: 20
            LO: 7
        by_status:
          type: object
          additionalProperties:
            type: integer
          example:
            open: 30
            fixed: 5
            false_positive: 2
            accepted_risk: 1
            fix_in_progress: 3
            duplicate: 1
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: API key for authentication
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token (JWT) in the Authorization header

````