> ## 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.

# Export workspace activities

> Exports a workspace's activity log over a date window as a downloadable file. The window is `from`/`to` (inclusive, YYYY-MM-DD); it defaults to the last 30 days and is capped at 366 days. The same `type` (repeatable) and `actor` filters as the feed apply. `format` is `csv` (default) or `json`. Each activity is a flat row: timestamp, the type split into object/action, the actor, and the acted-on object's id and label, oldest first. At most 100,000 rows are returned (the oldest in the window); a truncated export sets the `X-Export-Truncated` response header.



## OpenAPI

````yaml /api-reference/openapi.json get /workspaces/{workspaceId}/activities/export
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}/activities/export:
    get:
      tags:
        - Activities
      summary: Export workspace activities
      description: >-
        Exports a workspace's activity log over a date window as a downloadable
        file. The window is `from`/`to` (inclusive, YYYY-MM-DD); it defaults to
        the last 30 days and is capped at 366 days. The same `type` (repeatable)
        and `actor` filters as the feed apply. `format` is `csv` (default) or
        `json`. Each activity is a flat row: timestamp, the type split into
        object/action, the actor, and the acted-on object's id and label, oldest
        first. At most 100,000 rows are returned (the oldest in the window); a
        truncated export sets the `X-Export-Truncated` response header.
      parameters:
        - in: path
          name: workspaceId
          description: Workspace identifier.
          required: true
          schema:
            description: Workspace identifier.
            type: string
            format: uuid
          style: simple
        - in: query
          name: actor
          description: Account id whose activities to keep. Omit for any actor.
          schema:
            description: Account id whose activities to keep. Omit for any actor.
            type: string
            format: uuid
          style: form
        - in: query
          name: type
          description: >-
            Keep only these activity types (e.g. `document.created`). Repeat the
            `type`

            parameter for several; omit for no type constraint.
          schema:
            description: >-
              Keep only these activity types (e.g. `document.created`). Repeat
              the `type`

              parameter for several; omit for no type constraint.
            type: array
            items:
              $ref: '#/components/schemas/ActivityType'
          style: form
        - 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
        - in: query
          name: format
          description: Output format; defaults to `csv`.
          schema:
            $ref: '#/components/schemas/ExportFormat'
            description: Output format; defaults to `csv`.
          style: form
      responses:
        '200':
          description: The exported activity log.
          content:
            text/csv: {}
            application/json: {}
        '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:
    ActivityType:
      description: |-
        The type of activity performed in a workspace, for audit logging.

        Corresponds to the `ACTIVITY_TYPE` `PostgreSQL` enum and categorizes the
        activities that occur within workspaces for a comprehensive audit trail.
      oneOf:
        - description: Workspace was created.
          type: string
          const: workspace.created
        - description: Workspace settings or metadata were updated.
          type: string
          const: workspace.updated
        - description: Workspace was deleted.
          type: string
          const: workspace.deleted
        - description: Member was added to a workspace.
          type: string
          const: member.added
        - description: Member's role or permissions were updated.
          type: string
          const: member.updated
        - description: Member was removed from a workspace.
          type: string
          const: member.deleted
        - description: Invitation was created.
          type: string
          const: invite.created
        - description: Invitation was accepted.
          type: string
          const: invite.accepted
        - description: Invitation was declined.
          type: string
          const: invite.declined
        - description: Invitation was canceled.
          type: string
          const: invite.canceled
        - description: Connection was created.
          type: string
          const: connection.created
        - description: Connection was updated.
          type: string
          const: connection.updated
        - description: Connection was deleted.
          type: string
          const: connection.deleted
        - description: Connection sync started.
          type: string
          const: connection.sync.started
        - description: Connection sync completed.
          type: string
          const: connection.sync.completed
        - description: Connection sync failed.
          type: string
          const: connection.sync.failed
        - description: Provider was created.
          type: string
          const: provider.created
        - description: Provider was updated.
          type: string
          const: provider.updated
        - description: Provider was deleted.
          type: string
          const: provider.deleted
        - description: Webhook was created.
          type: string
          const: webhook.created
        - description: Webhook was updated.
          type: string
          const: webhook.updated
        - description: Webhook was deleted.
          type: string
          const: webhook.deleted
        - description: Document was created.
          type: string
          const: document.created
        - description: Document was updated.
          type: string
          const: document.updated
        - description: Document was deleted.
          type: string
          const: document.deleted
        - description: A review was opened.
          type: string
          const: review.opened
        - description: A review was reopened.
          type: string
          const: review.reopened
        - description: A review's title was changed.
          type: string
          const: review.renamed
        - description: A review was deleted.
          type: string
          const: review.deleted
        - description: A comment (message) was posted in a review.
          type: string
          const: review.comment.created
        - description: A review was verified.
          type: string
          const: review.verified
        - description: A review was assigned to a reviewer.
          type: string
          const: review.assigned
        - description: A review's reviewer was unassigned.
          type: string
          const: review.unassigned
        - description: Pipeline was created.
          type: string
          const: pipeline.created
        - description: Pipeline was updated.
          type: string
          const: pipeline.updated
        - description: Pipeline was deleted.
          type: string
          const: pipeline.deleted
        - description: Detection was started.
          type: string
          const: pipeline.detection.started
        - description: Detection finished analysis.
          type: string
          const: pipeline.detection.completed
        - description: Detection failed.
          type: string
          const: pipeline.detection.failed
        - description: Redaction was created.
          type: string
          const: pipeline.redaction.created
        - description: Policy was created.
          type: string
          const: policy.created
        - description: Policy was updated.
          type: string
          const: policy.updated
        - description: Policy was deleted.
          type: string
          const: policy.deleted
    ExportFormat:
      description: The file format an export is rendered as.
      oneOf:
        - description: Comma-separated values (the default).
          type: string
          const: csv
        - description: JSON.
          type: string
          const: json
    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

````