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

# Get Detection

> Retrieves details of a specific detection

Also served at `/api/v1/issue/{issue_id}`, this endpoint's earlier name, which stays supported with the same parameters and response.



## OpenAPI

````yaml /api-reference/openapi.json get /detections/{issue_id}
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
  - url: https://eu.corgea.app/api/v1
    description: EU production server
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /detections/{issue_id}:
    get:
      tags:
        - Detections
      summary: Get Detection
      description: >-
        Retrieves details of a specific detection


        Also served at `/api/v1/issue/{issue_id}`, this endpoint's earlier name,
        which stays supported with the same parameters and response.
      operationId: getIssue
      parameters:
        - name: issue_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The ID of the issue
        - name: show_full_code
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Whether to include the full code in the response
        - name: include_metadata
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Include scanner-provided identifiers in issue.metadata. Omitted by
            default; when requested, metadata is null if no identifiers are
            available.
        - name: include_reachability
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Include endpoint reachability details for the issue.
        - name: generate_fix
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Set to true to start generating an eligible missing fix in the
            background. When omitted or false, the current issue state is
            returned without starting fix generation.
        - name: wait_for_the_fix
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Wait for background fix generation before returning. Only applies
            when generate_fix is true and an eligible fix is missing. The wait
            is bounded (120 seconds by default); if generation is still pending,
            the response reports generating. Fetch the issue again to check for
            the completed fix.
      responses:
        '200':
          description: Issue details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  issue:
                    $ref: '#/components/schemas/IssueDetail'
        '404':
          description: Issue not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: Issue not found
components:
  schemas:
    IssueDetail:
      type: object
      properties:
        finding_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            ID of the finding this issue is a detection of: the same across
            rescans. Null for an issue ingested before findings existed.
        id:
          type: string
          format: uuid
        scan_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - open
            - fix_in_progress
            - fixed
            - false_positive
            - accepted_risk
            - duplicate
        urgency:
          type: string
          enum:
            - CR
            - HI
            - ME
            - LO
          description: 'Urgency code: CR (critical), HI (high), ME (medium), or LO (low).'
        created_at:
          type: string
          format: date-time
        first_detection_date:
          type: string
          format: date-time
          description: >-
            When Corgea first detected this issue, across every scan it appeared
            in. Equals created_at when this is the earliest detection.
        classification:
          type: object
          nullable: true
          description: >-
            When the CWE is unknown or the classification is a free-form label,
            id and name contain the original classification label and
            description is null. An empty classification is returned as null.
          properties:
            id:
              type: string
              example: CWE-123
            name:
              type: string
              example: Vulnerability Name
            description:
              type: string
              nullable: true
        location:
          $ref: '#/components/schemas/IssueLocation'
        details:
          type: object
          properties:
            explanation:
              type: string
            policy_guidance:
              type: object
              nullable: true
              description: >-
                Guidance from the policy that applies to this issue, or null
                when no policy guidance applies.
              properties:
                policy:
                  type: string
                  description: Policy name
                text:
                  type: string
                  description: Guidance text
            full_code:
              type: string
              description: >-
                Full source of the affected file. Returned only when
                show_full_code is true.
        auto_triage:
          $ref: '#/components/schemas/AutoTriage'
        auto_fix_suggestion:
          $ref: '#/components/schemas/AutoFixSuggestion'
        assigned_to:
          $ref: '#/components/schemas/AssignedTo'
        scanner_metadata:
          type: object
          description: Scanner-provided metadata attached to the issue.
          additionalProperties:
            type: string
        reachability:
          $ref: '#/components/schemas/IssueReachabilityDetail'
        metadata:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            Scanner-provided identifiers for this issue, such as a Fortify
            instance_id or a Checkmarx deep_link. Included only when
            include_metadata=true; null when no identifiers are available.
        status_comment:
          type: string
          nullable: true
          description: Recorded status-change comment; null when absent.
    IssueLocation:
      type: object
      properties:
        file:
          type: object
          properties:
            name:
              type: string
            language:
              type: string
            path:
              type: string
            git_hash:
              type: string
              nullable: true
              description: >-
                Git hash recorded for the scanned file. Returned only by the
                endpoints that list issues.
        project:
          type: object
          properties:
            name:
              type: string
            branch:
              type: string
            git_sha:
              type: string
        line_number:
          type: integer
        sink_line_number:
          type: integer
          nullable: true
          description: >-
            Line of the data-flow sink when the sink is in this file, or null
            otherwise. Returned only when getting a single issue.
    AutoTriage:
      type: object
      properties:
        false_positive_detection:
          type: object
          properties:
            status:
              type: string
              enum:
                - valid
                - false_positive
                - pending
            reasoning:
              description: >-
                False-positive reasoning when available, including when no fix
                was generated.
              type: string
              nullable: true
    AutoFixSuggestion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - fix_available
            - no_fix
            - generating
            - false_positive
            - on_hold
            - unsupported
            - plan
          description: >-
            Current fix availability. Getting an issue starts eligible missing
            fix generation in the background by default. While that generation
            is pending, the status is generating; fetch the issue again until
            generation finishes. If generation is disabled or no fix is
            produced, the status is no_fix.
        patch:
          type: object
          properties:
            diff:
              type: string
              description: >-
                Unified diff format patch. Returns an empty string when the fix
                has no diff.
            explanation:
              type: string
              description: Explanation of how the fix addresses the vulnerability
            full_code:
              type: string
              description: >-
                Full source of the file with the fix applied. Returned only when
                show_full_code is true and a fix exists.
    AssignedTo:
      type: object
      nullable: true
      description: User assigned to the issue, or null when the issue is unassigned.
      properties:
        id:
          type: string
          description: Assigned user's ID.
        email:
          type: string
          format: email
          description: Assigned user's email address.
        name:
          type: string
          nullable: true
          description: Assigned user's display name, or null when unavailable.
    IssueReachabilityDetail:
      type: object
      description: >-
        Endpoint reachability details returned when include_reachability is
        true.
      properties:
        is_reachable:
          type: boolean
        endpoints:
          type: array
          items:
            $ref: '#/components/schemas/IssueReachabilityEndpoint'
    IssueReachabilityEndpoint:
      type: object
      properties:
        path:
          type: string
        method:
          type: string
        file_path:
          type: string
          nullable: true
        line_number:
          type: integer
          nullable: true
        pathways:
          type: array
          items:
            $ref: '#/components/schemas/IssueReachabilityPathway'
    IssueReachabilityPathway:
      type: object
      properties:
        pathway_id:
          type: string
        total_depth:
          type: integer
        confidence_score:
          type: number
        target:
          type: object
          additionalProperties: true
        steps:
          type: array
          items:
            $ref: '#/components/schemas/IssueReachabilityStep'
    IssueReachabilityStep:
      type: object
      properties:
        depth:
          type: integer
        file_path:
          type: string
        line_number:
          type: integer
        function_name:
          type: string
        target_line_number:
          type: integer
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: >-
        API key for authentication API tokens belonging to inactive users are
        rejected.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token (JWT) in the Authorization header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.