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

# Workspace Usage

> The workspace's plan, current-month ingest counters, and the plan's caps —
the dashboard's usage meter plus the explanation for any capped drops.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/workspaces/{workspace_id}/usage
openapi: 3.1.0
info:
  title: Visceral Backend
  version: 0.2.0
  description: >-
    The Visceral backend HTTP API. SDK and ingestion endpoints authenticate with
    a workspace API key; dashboard endpoints authenticate with a user session
    token. Both are sent as `Authorization: Bearer <token>`.
servers:
  - url: https://api.visceralai.dev
security: []
paths:
  /v1/workspaces/{workspace_id}/usage:
    get:
      tags:
        - stats
      summary: Workspace Usage
      description: >-
        The workspace's plan, current-month ingest counters, and the plan's caps
        —

        the dashboard's usage meter plus the explanation for any capped drops.
      operationId: workspace_usage_v1_workspaces__workspace_id__usage_get
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - sessionToken: []
components:
  schemas:
    UsageSummary:
      properties:
        plan:
          type: string
          title: Plan
        month:
          type: string
          format: date
          title: Month
        events_accepted:
          type: integer
          title: Events Accepted
        spans_dropped_quota:
          type: integer
          title: Spans Dropped Quota
        spans_dropped_agent_cap:
          type: integer
          title: Spans Dropped Agent Cap
        max_agents_per_workspace:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Agents Per Workspace
        max_events_per_month:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Events Per Month
        retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retention Days
        quota_exceeded:
          type: boolean
          title: Quota Exceeded
      type: object
      required:
        - plan
        - month
        - events_accepted
        - spans_dropped_quota
        - spans_dropped_agent_cap
        - max_agents_per_workspace
        - max_events_per_month
        - retention_days
        - quota_exceeded
      title: UsageSummary
      description: >-
        The workspace's plan, current-month usage counters, and the plan's
        limits

        (None = uncapped) — what the dashboard needs to show a usage meter and

        explain any capped drops. `month` is the first day of the UTC calendar
        month.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    sessionToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Short-lived user access token (ES256 JWT) issued by `POST
        /v1/auth/login`.

````