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

# Aggregate verdict and personal data counts over a time window

> Requires the `runtime:events:read` permission.



## OpenAPI

````yaml /api-reference/openapi-runtime-security.yaml get /api/runtime-security/analytics
openapi: 3.1.0
info:
  title: Blindsight Runtime Security API
  version: 1.0.0
  summary: 'LLM firewall: prompt-injection, PII, and agent tool-call protection.'
  description: >
    Drop-in firewall for LLM traffic. Three integration modes:

      * **Scan API**, explicit `/scan/input` and `/scan/output` calls.
      * **Reverse proxy**, wire-compatible with the OpenAI, Anthropic, Gemini,
        Vertex and Bedrock APIs; swap the SDK's `base_url` to enable scanning
        at the network boundary.
      * **Tool-call scan**, a check of agent tool arguments before execution.

    **Authentication.** Send a Blindsight API key in the `X-API-Key` header.

    Each key carries permissions, and an endpoint needs one of them:


    | Permission | Value | Endpoints |

    | --- | --- | --- |

    | Scan prompts and responses | `runtime:scan` | `/scan/*` and `/proxy/*` |

    | Read threat events | `runtime:events:read` | `/events`,
    `/events/{uuid}/explain`, `/analytics`, `/drift`, `/health`,
    `/service-status` and the other read endpoints |

    | Read firewall configuration | `runtime:config:read` | `GET /config` |

    | Write firewall configuration | `runtime:config:write` | `PUT /config` |


    `runtime:*` (Full Runtime Access) and full platform access cover all of

    them. A key acts as the person who created it and can never do more than

    that person can.


    All timestamps are UTC, ISO 8601, ending in `Z`, unless an endpoint says

    otherwise.


    See the Runtime Security guides for prose docs, SDK examples, and a

    walk-through of verdicts and configuration.
  contact:
    name: Blindsight Support
    url: https://blindsight.example.com/support
  license:
    name: Proprietary
servers:
  - url: https://platform.blindsight.io
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Scan
    description: Single-call scan endpoints for input, output, batch, and tool calls.
  - name: Proxy
    description: >-
      Wire-compatible reverse-proxy endpoints for OpenAI, Anthropic, Gemini,
      Vertex and Bedrock.
  - name: Configuration
    description: Workspace-scoped firewall settings.
  - name: Analytics
    description: Read-only analytics, event log, and drift endpoints.
  - name: Health
    description: Firewall readiness and service status.
paths:
  /api/runtime-security/analytics:
    get:
      tags:
        - Analytics
      summary: Aggregate verdict and personal data counts over a time window
      description: Requires the `runtime:events:read` permission.
      operationId: getAnalytics
      parameters:
        - name: days
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 3650
            default: 14
          description: >-
            The last N days. Ignored when `minutes` or `start` and `end` are
            set.
        - name: minutes
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 5256000
          description: The last N minutes. Overrides `days`.
        - name: start
          in: query
          schema:
            type: string
            format: date-time
          description: Start of an absolute window (UTC). Requires `end`.
        - name: end
          in: query
          schema:
            type: string
            format: date-time
          description: >-
            End of an absolute window (UTC). Requires `start` and must be after
            it.
        - name: app
          in: query
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          description: >-
            App UUID. Repeat to include several Apps. An unknown App returns
            `400`.
      responses:
        '200':
          description: Aggregates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsResponse'
              example:
                range_days: 7
                range_minutes: 10080
                bucket_seconds: 86400
                totals:
                  total: 6200
                  input: 4100
                  output: 2050
                  tool_call: 50
                  pii_hits: 210
                  injection_hits: 31
                verdict_breakdown:
                  allow: 5950
                  flag: 12
                  redact: 210
                  block: 28
                pii_category_breakdown:
                  email: 120
                  phone: 55
                  person: 35
                avg_latency_ms: null
                p95_latency_ms: null
                series:
                  - date: '2026-10-28'
                    allow: 850
                    flag: 2
                    redact: 30
                    block: 4
                    total: 886
        '400':
          description: >-
            Only one of `start` and `end`, `end` not after `start`, or an
            unknown App
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotEnabled'
components:
  schemas:
    AnalyticsResponse:
      type: object
      properties:
        range_days:
          type: integer
        range_minutes:
          type: integer
        bucket_seconds:
          type: integer
          description: Width of one `series` bucket in seconds.
        totals:
          type: object
          properties:
            total:
              type: integer
            input:
              type: integer
            output:
              type: integer
            tool_call:
              type: integer
            pii_hits:
              type: integer
              description: Events with personal data.
            injection_hits:
              type: integer
              description: Events with an injection finding.
        verdict_breakdown:
          type: object
          properties:
            allow:
              type: integer
            flag:
              type: integer
            redact:
              type: integer
            block:
              type: integer
        avg_latency_ms:
          type: number
          nullable: true
          description: '`null` unless the key''s owner may view firewall latency.'
        p95_latency_ms:
          type: number
          nullable: true
        pii_category_breakdown:
          type: object
          additionalProperties:
            type: integer
        series:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
                description: >-
                  Bucket start in UTC (`YYYY-MM-DD`, or `YYYY-MM-DDTHH:MM` for
                  windows of a day or less).
              allow:
                type: integer
              flag:
                type: integer
              redact:
                type: integer
              block:
                type: integer
              total:
                type: integer
  responses:
    Unauthorized:
      description: The API key is missing, invalid, expired or disabled
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
    Forbidden:
      description: >-
        The key does not have the permission this endpoint needs, or its owner
        no longer holds it
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
    NotEnabled:
      description: >-
        Runtime Security (or the module this endpoint belongs to) is not enabled
        for the workspace
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        Blindsight API key (`ak_...`). The permissions it needs are listed in
        the API description and on each operation: `runtime:scan` for scan and
        proxy routes, `runtime:events:read` for events, analytics, drift,
        health and service status, `runtime:config:read` to read the
        configuration and `runtime:config:write` to change it.

````

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