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

# Workspace detection time series

> Returns a workspace's daily detection activity over a date window: detections per day, plus each day's error rate and durations. Every day in the window is present (quiet days report detections: 0), so the series plots as a continuous line or a contribution-style calendar. The window is `from`/`to` (inclusive, YYYY-MM-DD); it defaults to the last 30 days and is capped at 366 days.



## OpenAPI

````yaml /api-reference/openapi.json get /workspaces/{workspaceId}/analytics/detections/timeseries
openapi: 3.1.0
info:
  title: Nvisy API
  summary: Document detection and redaction platform
  description: >-
    Nvisy provides intelligent detection of sensitive content in documents,
    redaction pipelines, and reviewer workflows. This API enables document
    upload, detection analysis, redaction, and collaborative review across your
    workspaces.
  termsOfService: https://nvisy.com/legal/terms-of-service
  contact:
    name: Nvisy Support
    url: https://nvisy.com
    email: hello@nvisy.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 0.1.0
servers: []
security: []
tags:
  - name: Health
    description: Service health checks
  - name: Capabilities
    description: Read-only reference data describing this deployment
  - name: Accounts
    description: Account management and profile operations
  - name: Identities
    description: 'Account sign-in methods: password and linked providers'
  - name: Avatars
    description: Public avatar image serving
  - name: Authentication
    description: Login, signup, and token management
  - name: Workspaces
    description: Workspace creation and management
  - name: Activities
    description: Workspace activity log and export
  - name: Documents
    description: Document upload, download, and management
  - name: Analytics
    description: Aggregate metrics over a workspace's documents
  - name: Members
    description: Workspace member management
  - name: Invites
    description: Workspace invitation handling
  - name: API Tokens
    description: API token management
  - name: Connections
    description: External provider connections
  - name: Connection Syncs
    description: Connection synchronization runs
  - name: Providers
    description: Inference-provider configuration
  - name: Pipelines
    description: Redaction pipeline configuration
  - name: Detections
    description: Detection analysis and redaction
  - name: Redactions
    description: Redactions produced from a detection, with reviewer edits
  - name: Reviews
    description: Document reviews, the review queue, and their discussion
  - name: Policies
    description: Redaction policy configuration
  - name: Webhooks
    description: Webhook configuration
  - name: Notifications
    description: Account notification management
paths:
  /workspaces/{workspaceId}/analytics/detections/timeseries:
    get:
      tags:
        - Analytics
      summary: Workspace detection time series
      description: >-
        Returns a workspace's daily detection activity over a date window:
        detections per day, plus each day's error rate and durations. Every day
        in the window is present (quiet days report detections: 0), so the
        series plots as a continuous line or a contribution-style calendar. The
        window is `from`/`to` (inclusive, YYYY-MM-DD); it defaults to the last
        30 days and is capped at 366 days.
      parameters:
        - in: path
          name: workspaceId
          description: Workspace identifier.
          required: true
          schema:
            description: Workspace identifier.
            type: string
            format: uuid
          style: simple
        - in: query
          name: from
          description: >-
            First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the
            range

            spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
          schema:
            description: >-
              First day of the range (inclusive), `YYYY-MM-DD`. Defaults so the
              range

              spans the last `DEFAULT_WINDOW_DAYS` days through `to`.
            type: string
            format: date
          style: form
        - in: query
          name: to
          description: >-
            Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today
            (UTC).
          schema:
            description: >-
              Last day of the range (inclusive), `YYYY-MM-DD`. Defaults to today
              (UTC).
            type: string
            format: date
          style: form
      responses:
        '200':
          description: >-
            A workspace's daily detection activity over a window: one point per
            day, dense

            (quiet days included with `detections: 0`), ready to plot as a
            continuous

            series.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceDetectionTimeSeries'
        '400':
          description: >-
            The serialized shape of an HTTP error: the inert wire/OpenAPI-schema
            view

            that [`Error`] renders to at the response boundary.


            It carries no builder logic — [`Error`] is the type handlers
            construct and

            thread through `Result`, and it builds an `ErrorResponse` directly
            in its

            `IntoResponse` impl. `context` and `status` are not part of the JSON
            body

            (`context` is logged, `status` sets the HTTP status line).


            [`Error`]: crate::response::Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: >-
            The serialized shape of an HTTP error: the inert wire/OpenAPI-schema
            view

            that [`Error`] renders to at the response boundary.


            It carries no builder logic — [`Error`] is the type handlers
            construct and

            thread through `Result`, and it builds an `ErrorResponse` directly
            in its

            `IntoResponse` impl. `context` and `status` are not part of the JSON
            body

            (`context` is logged, `status` sets the HTTP status line).


            [`Error`]: crate::response::Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            The serialized shape of an HTTP error: the inert wire/OpenAPI-schema
            view

            that [`Error`] renders to at the response boundary.


            It carries no builder logic — [`Error`] is the type handlers
            construct and

            thread through `Result`, and it builds an `ErrorResponse` directly
            in its

            `IntoResponse` impl. `context` and `status` are not part of the JSON
            body

            (`context` is logged, `status` sets the HTTP status line).


            [`Error`]: crate::response::Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            The serialized shape of an HTTP error: the inert wire/OpenAPI-schema
            view

            that [`Error`] renders to at the response boundary.


            It carries no builder logic — [`Error`] is the type handlers
            construct and

            thread through `Result`, and it builds an `ErrorResponse` directly
            in its

            `IntoResponse` impl. `context` and `status` are not part of the JSON
            body

            (`context` is logged, `status` sets the HTTP status line).


            [`Error`]: crate::response::Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    WorkspaceDetectionTimeSeries:
      description: >-
        A workspace's daily detection activity over a window: one point per day,
        dense

        (quiet days included with `detections: 0`), ready to plot as a
        continuous

        series.
      type: object
      properties:
        points:
          description: One entry per day in the requested window, oldest first.
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceDetectionDayEntry'
      required:
        - points
    ErrorResponse:
      description: >-
        The serialized shape of an HTTP error: the inert wire/OpenAPI-schema
        view

        that [`Error`] renders to at the response boundary.


        It carries no builder logic — [`Error`] is the type handlers construct
        and

        thread through `Result`, and it builds an `ErrorResponse` directly in
        its

        `IntoResponse` impl. `context` and `status` are not part of the JSON
        body

        (`context` is logged, `status` sets the HTTP status line).


        [`Error`]: crate::response::Error
      type: object
      properties:
        message:
          description: User-friendly error message safe for client display.
          type: string
        name:
          description: The error name/type identifier.
          type: string
      required:
        - name
        - message
    WorkspaceDetectionDayEntry:
      description: A single day of detection activity.
      type: object
      properties:
        avgDurationMs:
          description: >-
            Mean completed-detection duration (milliseconds) this day; omitted
            if none completed.
          type: integer
          format: int64
        date:
          description: The day (`YYYY-MM-DD`, UTC).
          type: string
          format: date
        detections:
          description: Detections started this day (`0` on a quiet day).
          type: integer
          format: int64
        errorRate:
          description: >-
            Failed / (completed + failed) for this day; omitted when no
            detection

            reached a terminal state that day.
          type: number
          format: double
        inputTokens:
          description: >-
            Input/prompt tokens spent by this day's detections; omitted when
            none used a model.
          type: integer
          format: int64
        outputTokens:
          description: >-
            Output/completion tokens spent this day; omitted when none used a
            model.
          type: integer
          format: int64
        p95DurationMs:
          description: >-
            95th-percentile completed-detection duration (milliseconds) this
            day; omitted if none.
          type: integer
          format: int64
        totalTokens:
          description: Reported total tokens this day; omitted when none used a model.
          type: integer
          format: int64
      required:
        - date
        - detections

````