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

# Get plugin call stats

> Calls, errors and latency of every plugin Contribution invoked for the key's Organization over the window, per plugin version and operation, with the last error code the plugin declared (or plugin_unavailable, invalid_output). Counts are written by each process every few seconds and kept 7 days; a window reads buckets of one resolution (1 minute for 1h, 15 minutes for 24h, 2 hours for 7d) and lists only non-empty ones. Latency percentiles are interpolated from fixed buckets. Requires observability:read on a key that grants every Corpus.



## OpenAPI

````yaml /openapi.yaml get /v0/admin/stats/plugins
openapi: 3.1.0
info:
  title: Quivr HTTP API
  version: 0.0.0-draft
  description: >-
    Every endpoint of the Quivr v0 HTTP API. Send an API key as a bearer token;
    the key decides the Organization, the actions and the Corpora a request may
    reach.
servers: []
security:
  - ApiKey: []
paths:
  /v0/admin/stats/plugins:
    get:
      tags:
        - Admin
      summary: Get plugin call stats
      description: >-
        Calls, errors and latency of every plugin Contribution invoked for the
        key's Organization over the window, per plugin version and operation,
        with the last error code the plugin declared (or plugin_unavailable,
        invalid_output). Counts are written by each process every few seconds
        and kept 7 days; a window reads buckets of one resolution (1 minute for
        1h, 15 minutes for 24h, 2 hours for 7d) and lists only non-empty ones.
        Latency percentiles are interpolated from fixed buckets. Requires
        observability:read on a key that grants every Corpus.
      operationId: getPluginCallStats
      parameters:
        - name: window
          in: query
          required: false
          schema:
            type: string
            enum:
              - 1h
              - 24h
              - 7d
            default: 1h
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PluginCallStatsList'
        default:
          description: >-
            Structured error; 401 unauthenticated, 403 without
            observability:read on every Corpus, 422 invalid_window, 503 storage
            unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PluginCallStatsList:
      type: object
      additionalProperties: false
      properties:
        window:
          $ref: '#/components/schemas/StatsWindowName'
        resolution_seconds:
          type: integer
          minimum: 1
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
        items:
          type: array
          items:
            $ref: '#/components/schemas/PluginCallStats'
      required:
        - window
        - resolution_seconds
        - from
        - to
        - items
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: string
          minLength: 1
        message:
          type: string
          minLength: 1
        retryable:
          type: boolean
        field:
          type: string
          minLength: 1
          description: >-
            JSON Pointer (RFC 6901) to the request member that caused a 422,
            when known (for example /config/url or /credential/secret/token on
            connector commands).
        resync_url:
          type: string
          format: uri-reference
      required:
        - code
        - message
        - retryable
    StatsWindowName:
      type: string
      enum:
        - 1h
        - 24h
        - 7d
    PluginCallStats:
      type: object
      additionalProperties: false
      properties:
        plugin_id:
          type: string
          minLength: 1
        plugin_version:
          type: string
          minLength: 1
        operation:
          type: string
          enum:
            - normalize
            - segment_and_embed
            - embed_query
            - search_round
            - connector_fetch
            - connector_receive
            - check_credential
            - describe_attachment
            - upload_attachment
            - evaluate_subscription
        summary:
          $ref: '#/components/schemas/StatsSummary'
        points:
          type: array
          description: Non-empty buckets, oldest first.
          items:
            $ref: '#/components/schemas/StatsPoint'
      required:
        - plugin_id
        - plugin_version
        - operation
        - summary
        - points
    StatsSummary:
      type: object
      additionalProperties: false
      description: >-
        A series over the whole window. Latencies are in milliseconds and
        present only when count is positive.
      properties:
        count:
          type: integer
          minimum: 0
        errors:
          type: integer
          minimum: 0
        p50_ms:
          type: number
          minimum: 0
        p95_ms:
          type: number
          minimum: 0
        mean_ms:
          type: number
          minimum: 0
        last_error_code:
          type: string
          minLength: 1
        last_error_at:
          type: string
          format: date-time
      required:
        - count
        - errors
    StatsPoint:
      type: object
      additionalProperties: false
      description: >-
        One non-empty bucket, starting at start and lasting the list's
        resolution_seconds.
      properties:
        start:
          type: string
          format: date-time
        count:
          type: integer
          minimum: 1
        errors:
          type: integer
          minimum: 0
        p50_ms:
          type: number
          minimum: 0
        p95_ms:
          type: number
          minimum: 0
      required:
        - start
        - count
        - errors
        - p50_ms
        - p95_ms
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        API key, not necessarily a JWT. Server derives Organization, permitted
        actions and Corpus scope; every resource access is authorized.

````