Vijil detections API

The detections API from Vijil — 2 operation(s) for detections.

OpenAPI Specification

vijil-detections-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Vijil Console API (Combined) agent-configurations detections API
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
tags:
- name: detections
paths:
  /v1/detections:
    post:
      tags:
      - detections
      summary: Create Detection
      description: 'Create a new detection request.


        This endpoint accepts a detection request and starts processing it

        asynchronously. The response includes the detection ID which can be

        used to poll for results via GET /detections/{id}.


        Note: This endpoint does not require authentication to support

        the Execution Flow test input feature.'
      operationId: create_detection_v1_detections_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DetectionRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetectionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/detections/{detection_id}:
    get:
      tags:
      - 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:
    DetectionParams:
      properties:
        api_key_proxy:
          anyOf:
          - type: string
          - type: 'null'
          title: Api Key Proxy
        hub:
          anyOf:
          - type: string
          - type: 'null'
          title: Hub
        model:
          anyOf:
          - type: string
          - type: 'null'
          title: Model
      type: object
      title: DetectionParams
      description: Parameters for a detection request.
    DetectionRequest:
      properties:
        id:
          type: string
          title: Id
        detector_id:
          type: string
          title: Detector Id
        detector_params:
          $ref: '#/components/schemas/DetectionParams'
        detector_inputs:
          items:
            $ref: '#/components/schemas/DetectionInput'
          type: array
          title: Detector Inputs
      type: object
      required:
      - id
      - detector_id
      - detector_inputs
      title: DetectionRequest
      description: Request model for creating 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
    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.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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.
    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.