> ## 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 Campaign Results

> Get normalized results of a completed red team campaign.



## OpenAPI

````yaml /openapi/api.json get /v1/campaigns/{campaign_id}/results
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/campaigns/{campaign_id}/results:
    get:
      tags:
        - Red Team
        - redteam
      summary: Get Campaign Results
      description: Get normalized results of a completed red team campaign.
      operationId: get_campaign_results_v1_campaigns__campaign_id__results_get
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Campaign Id
        - name: team_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
            description: Team that owns this campaign
          description: Team that owns this campaign
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RedteamResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RedteamResult:
      properties:
        job_id:
          type: string
          format: uuid
          title: Job Id
          description: Campaign job ID these results belong to
        tool:
          $ref: '#/components/schemas/RedteamTool'
          description: Tool that produced these results
        findings:
          items:
            $ref: '#/components/schemas/Finding'
          type: array
          title: Findings
          description: Individual vulnerability findings
        summary:
          $ref: '#/components/schemas/RedteamSummary'
          description: Aggregate statistics
        raw_output:
          additionalProperties: true
          type: object
          title: Raw Output
          description: Full tool-native output for debugging
      type: object
      required:
        - job_id
        - tool
        - summary
      title: RedteamResult
      description: |-
        Normalized results from any red team tool.

        Adapters convert tool-native output into this common format,
        enabling cross-tool comparison and unified reporting.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RedteamTool:
      type: string
      enum:
        - diamond_security
        - promptfoo
        - garak
        - pyrit
        - unknown
      title: RedteamTool
      description: Supported red team tools.
    Finding:
      properties:
        category:
          type: string
          title: Category
          description: Attack category that produced this finding
        severity:
          type: string
          title: Severity
          description: Severity level (critical, high, medium, low)
        attack_prompt:
          type: string
          title: Attack Prompt
          description: The adversarial input sent to the agent
        agent_response:
          type: string
          title: Agent Response
          description: The agent's response to the attack
        passed:
          type: boolean
          title: Passed
          description: Whether the agent resisted the attack
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            Normalized structured extras: fields the adapter has explicitly
            parsed and named (e.g. plugin_id, score_reason). Use when the
            adapter can provide typed context. Distinct from raw_metadata, which
            is the verbatim tool output.
        attack_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Attack Type
          description: Tool's native attack category name
        phenotype_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Phenotype Category
          description: Mapped taxonomy path (e.g., 'security.integrity.prompt_injection')
        attack_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Attack Score
          description: 0-1 score for this specific attack type
        detector_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Detector Id
          description: Which detector/plugin scored this
        raw_metadata:
          additionalProperties: true
          type: object
          title: Raw Metadata
          description: >-
            Verbatim tool-native output preserved as-is for debugging and
            auditability. Always populated by adapters. Distinct from metadata,
            which contains selectively parsed and normalized fields.
      type: object
      required:
        - category
        - severity
        - attack_prompt
        - agent_response
        - passed
      title: Finding
      description: |-
        A single vulnerability finding, normalized across all tools.

        Each tool adapter maps its native output format into this structure.
    RedteamSummary:
      properties:
        total_tests:
          type: integer
          minimum: 0
          title: Total Tests
          description: Total number of tests executed
        passed:
          type: integer
          minimum: 0
          title: Passed
          description: Tests where the agent resisted the attack
        failed:
          type: integer
          minimum: 0
          title: Failed
          description: Tests where the attack succeeded
        errors:
          type: integer
          minimum: 0
          title: Errors
          description: Tests that errored during execution
          default: 0
        categories_tested:
          items:
            type: string
          type: array
          title: Categories Tested
          description: Attack categories that were tested
        vulnerabilities_found:
          type: boolean
          title: Vulnerabilities Found
          description: Whether any attacks succeeded
      type: object
      required:
        - total_tests
        - passed
        - failed
        - categories_tested
        - vulnerabilities_found
      title: RedteamSummary
      description: Aggregate statistics for a red team campaign.
    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

````