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

# Get workspace activity

> Gets aggregated usage activity for a workspace grouped by date and model.
Time filter availability depends on the workspace plan:
- `base`: hour, day, week
- `standard`: hour, day, week, month
- `pro`: all filters available



## OpenAPI

````yaml /spec/ai-workspaces.yaml get /v1/workspaces/{workspaceID}/activity
openapi: 3.0.1
info:
  title: AI - Workspaces
  description: >-
    Manage AI workspaces. Workspaces are the primary organizational unit for AI
    resources.

    Each workspace has a plan (base, standard, pro), a state (ACTIVE, FROZEN),
    and provider preferences.


    Parameters:

    - `teamID`: To access services in a team (query param or `x-teamid` header)


    Authentication: JWT Bearer token sent via the `Authorization` header.
  termsOfService: '#'
  contact:
    email: info@liara.ir
  version: 1.0.0
servers:
  - url: https://ai.liara.ir
security:
  - jwt: []
tags:
  - name: Workspaces
    description: Workspace CRUD operations
  - name: Workspace Actions
    description: Workspace actions (resize, unfreeze, provider preferences)
  - name: Workspace Activity
    description: Usage activity and free token tracking
  - name: Model Limits
    description: Model-specific limits within a workspace
externalDocs:
  description: Find out more about Liara AI
  url: https://liara.ir
paths:
  /v1/workspaces/{workspaceID}/activity:
    get:
      tags:
        - Workspace Activity
      summary: Get workspace activity
      description: >-
        Gets aggregated usage activity for a workspace grouped by date and
        model.

        Time filter availability depends on the workspace plan:

        - `base`: hour, day, week

        - `standard`: hour, day, week, month

        - `pro`: all filters available
      operationId: getWorkspaceActivity
      parameters:
        - name: workspaceID
          in: path
          required: true
          description: The workspace ID
          schema:
            type: string
            pattern: ^[a-f0-9]{24}$
        - name: filter
          in: query
          description: Time filter for activity aggregation
          schema:
            type: string
            enum:
              - twoMonth
              - month
              - day
              - hour
              - week
            default: day
        - name: key
          in: query
          description: Filter by API key name
          schema:
            type: string
            minLength: 3
            maxLength: 15
      responses:
        '200':
          description: Activity data
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ActivityEntry'
        '401':
          description: Missing authentication
          content: {}
        '404':
          description: Workspace not found
          content: {}
        '416':
          description: Filter not available on current plan
          content: {}
components:
  schemas:
    ActivityEntry:
      type: object
      properties:
        date:
          type: string
          description: Date of activity
        data:
          type: array
          items:
            type: object
            properties:
              model:
                type: string
              total_tokens:
                type: integer
              total_cost_tomans:
                type: number
              request_count:
                type: integer
  securitySchemes:
    jwt:
      type: apiKey
      description: 'Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345"'
      name: Authorization
      in: header

````