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

# Generate an agent evidence quality case

> Requires scopes: reports:write



## OpenAPI

````yaml /api-reference/openapi.json post /api/agent-evidence/quality-case/generate
openapi: 3.1.0
info:
  title: EvalGate API
  version: 3.7.6
  description: EvalGate API. See docs/api-contract.md for stability commitments.
servers:
  - url: https://evalgate.com
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
paths:
  /api/agent-evidence/quality-case/generate:
    post:
      tags:
        - agent evidence
      summary: Generate an agent evidence quality case
      description: 'Requires scopes: reports:write'
      operationId: post_agent_evidence_quality_case_generate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PostApiAgentEvidenceQualityCaseGenerateRequest
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiAgentEvidenceQualityCaseGenerateResponse201ApplicationJson
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth:
            - reports:write
components:
  schemas:
    PostApiAgentEvidenceQualityCaseGenerateRequest:
      type: object
      properties:
        title:
          type: string
        scope:
          oneOf:
            - type: string
              enum:
                - runtime
            - type: string
              enum:
                - benchmark
            - type: string
              enum:
                - deployment
            - type: string
              enum:
                - ai_system
            - type: string
              enum:
                - connector
        caseKey:
          type: string
        aiSystemId:
          type: number
        evidenceItemIds:
          type: array
          items:
            type: number
        runtimeId:
          type: number
        connectorId:
          type: number
        knownRisks:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
        restrictions:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
        policyDecisionSummary:
          type: object
          properties:
            denied:
              type: number
            allowed:
              type: number
            requiresApproval:
              type: number
          additionalProperties: false
        openIncidentCount:
          type: number
        approvalScope:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
      additionalProperties: false
      required:
        - title
        - scope
        - caseKey
    PostApiAgentEvidenceQualityCaseGenerateResponse201ApplicationJson:
      type: object
      properties:
        status:
          type: string
        title:
          type: string
        confidence:
          type: number
        id:
          type: number
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        organizationId:
          $ref: '#/components/schemas/OrganizationId'
        createdBy:
          oneOf:
            - type: 'null'
            - type: string
        aiSystemId:
          oneOf:
            - type: 'null'
            - type: number
        approvals:
          allOf:
            - type: object
              properties:
                schemaVersion:
                  type: number
                approvals:
                  type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          approver:
                            type: string
                          decision:
                            type: string
                          approvedAt:
                            type: string
                        additionalProperties: false
                        required:
                          - approver
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
              additionalProperties: false
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
        caseKey:
          type: string
        runtimeId:
          oneOf:
            - type: 'null'
            - type: number
        connectorId:
          oneOf:
            - type: 'null'
            - type: number
        supportingEvidenceItemIds:
          type: array
          items:
            type: number
        knownRisks:
          allOf:
            - type: object
              properties:
                schemaVersion:
                  type: number
                risks:
                  type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          description:
                            type: string
                          severity:
                            oneOf:
                              - type: string
                                enum:
                                  - low
                              - type: string
                                enum:
                                  - medium
                              - type: string
                                enum:
                                  - high
                              - type: string
                                enum:
                                  - critical
                          mitigation:
                            type: string
                        additionalProperties: false
                        required:
                          - description
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
              additionalProperties: false
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
        restrictions:
          allOf:
            - type: object
              properties:
                schemaVersion:
                  type: number
                restrictions:
                  type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          type:
                            type: string
                          description:
                            type: string
                        additionalProperties: false
                        required:
                          - type
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
              additionalProperties: false
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
        nextReviewAt:
          oneOf:
            - type: 'null'
            - type: string
              format: date-time
        report:
          allOf:
            - type: object
              properties:
                summary:
                  type: string
                schemaVersion:
                  type: number
                findings:
                  type: array
                  items:
                    type: string
                recommendations:
                  type: array
                  items:
                    type: string
              additionalProperties: false
            - type: object
              additionalProperties:
                $ref: '#/components/schemas/JsonValue'
      additionalProperties: false
      required:
        - status
        - title
        - confidence
        - id
        - createdAt
        - updatedAt
        - organizationId
        - createdBy
        - aiSystemId
        - approvals
        - caseKey
        - runtimeId
        - connectorId
        - supportingEvidenceItemIds
        - knownRisks
        - restrictions
        - nextReviewAt
        - report
    JsonValue:
      oneOf:
        - type: 'null'
        - type: boolean
        - type: number
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    OrganizationId:
      type: string
      format: uuid
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - NO_ORG_MEMBERSHIP
                - CROSS_ORG_REFERENCE
                - INCOMPLETE
                - MALFORMED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
          required:
            - code
            - message
      required:
        - error
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Session Token

````