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

# Get Detection

> Get a detection by ID.

Returns the current status and results of a detection.
Status values:
- CREATED: Detection is queued for processing
- PROCESSING: Detection is being processed
- COMPLETED: Detection finished successfully
- ERROR: Detection failed

Note: This endpoint does not require authentication to support
the Execution Flow test input feature.



## OpenAPI

````yaml /openapi/api.json get /v1/detections/{detection_id}
openapi: 3.1.0
info:
  title: Vijil Console API (Combined)
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
servers: []
security: []
tags:
  - name: Teams
    description: Authentication, users, and team management
  - name: Agent Environment
    description: Agent, persona, policy, and harness management
  - name: Diamond
    description: Evaluation management and report retrieval
  - name: Dome
    description: Protection, guardrails, and telemetry
  - name: Red Team
    description: Red team campaigns
paths:
  /v1/detections/{detection_id}:
    get:
      tags:
        - Dome
        - detections
      summary: Get Detection
      description: |-
        Get a detection by ID.

        Returns the current status and results of a detection.
        Status values:
        - CREATED: Detection is queued for processing
        - PROCESSING: Detection is being processed
        - COMPLETED: Detection finished successfully
        - ERROR: Detection failed

        Note: This endpoint does not require authentication to support
        the Execution Flow test input feature.
      operationId: get_detection_v1_detections__detection_id__get
      parameters:
        - name: detection_id
          in: path
          required: true
          schema:
            type: string
            title: Detection Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetectionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DetectionResponse:
      properties:
        id:
          type: string
          title: Id
        status:
          type: string
          title: Status
        detector_inputs:
          items:
            $ref: '#/components/schemas/DetectionInput'
          type: array
          title: Detector Inputs
        detector_outputs:
          items:
            $ref: '#/components/schemas/DetectionOutput'
          type: array
          title: Detector Outputs
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
      type: object
      required:
        - id
        - status
      title: DetectionResponse
      description: Response model for a detection.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DetectionInput:
      properties:
        response:
          anyOf:
            - type: string
            - type: 'null'
          title: Response
        question:
          anyOf:
            - type: string
            - type: 'null'
          title: Question
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
        dome_detection_method:
          anyOf:
            - type: string
            - type: 'null'
          title: Dome Detection Method
      type: object
      title: DetectionInput
      description: Input for a detection request.
    DetectionOutput:
      properties:
        score:
          type: number
          title: Score
          default: 0
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: DetectionOutput
      description: Output from a detection.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````