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

# Get workspace analytics

> Query analytics metrics for the workspace associated with the API key. Results are scoped to the workspace and time range provided.



## OpenAPI

````yaml get /v1/analytics/{metric}
openapi: 3.1.0
info:
  title: Noxus Backend
  description: >-
    Backend API for the Noxus Platform. More information can be found at
    https://docs.noxus.ai
  version: 1.1.0
servers: []
security: []
paths:
  /v1/analytics/{metric}:
    get:
      tags:
        - V1 - Analytics
      summary: Get workspace analytics
      description: >-
        Query analytics metrics for the workspace associated with the API key.
        Results are scoped to the workspace and time range provided.
      operationId: get_workspace_analytics
      parameters:
        - name: metric
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/PublicAnalyticsKey'
        - name: time_start
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: Start of the time range (ISO 8601 with timezone)
            title: Time Start
          description: Start of the time range (ISO 8601 with timezone)
        - name: time_end
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: End of the time range (ISO 8601 with timezone)
            title: Time End
          description: End of the time range (ISO 8601 with timezone)
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Page number for paginated metrics
            title: Page
          description: Page number for paginated metrics
        - name: page_size
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 200
                minimum: 1
              - type: 'null'
            description: Page size for paginated metrics (default 50, max 200)
            title: Page Size
          description: Page size for paginated metrics (default 50, max 200)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublicAnalyticsKey:
      type: string
      enum:
        - flow_runs
        - trigger_runs
        - manual_runs
        - agent_runs
        - active_users
        - active_runs
        - active_triggers
        - errors
        - average_run_time
        - flow_runs_distribution
        - flow_per_user
        - errors_over_time
        - run_time_over_time
        - ai_models_total_cost
        - ai_models_total_tokens
        - average_cost_per_run
        - tokens_cost
        - tokens_cost_by_workflow
        - tokens_cost_by_user
        - tokens_cost_by_node
        - model_tokens_total_cost
        - ai_operations_per_tool
        - model_tokens_per_tool
        - ai_operations_per_user
        - model_tokens_per_user
        - conversations_started
        - messages_sent
        - messages_per_conversation
        - conversation_users
        - conversations_started_over_time
        - messages_sent_over_time
        - conversations_started_by_user
        - messages_sent_by_user
        - conversation_tokens_cost
        - conversation_tokens_cost_by_user
        - conversation_chat_costs_total
        - api_calls_per_date
        - api_calls_per_endpoint
        - api_calls_log
        - kb_total_documents
        - kb_processed_successfully
        - kb_contributors
        - kb_failed_documents
        - kb_documents_over_time
        - kb_documents_per_kb
        - kb_documents_by_user
        - kb_document_types
        - kb_user_activity
        - kb_overview
      title: PublicAnalyticsKey
      description: >-
        Analytics metrics available via the public API.


        Excludes billing-constraint overage keys, cross-workspace/tenant
        aggregates,

        infrastructure/worker metrics, and internal labelling-system keys.
    AnalyticsResponse:
      properties:
        type:
          $ref: '#/components/schemas/AnalyticsType'
        value:
          anyOf:
            - $ref: '#/components/schemas/AnalyticsSimpleValue'
            - $ref: '#/components/schemas/AnalyticsBarChartsValue'
            - $ref: '#/components/schemas/AnalyticsTableValue'
            - $ref: '#/components/schemas/AnalyticsPaginatedTableValue'
          title: Value
      type: object
      required:
        - type
        - value
      title: AnalyticsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AnalyticsType:
      type: string
      enum:
        - simple
        - barchart
        - table
        - horizontal-barchart
        - empty
      title: AnalyticsType
    AnalyticsSimpleValue:
      properties:
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
          title: Value
        suffix:
          anyOf:
            - type: string
            - type: 'null'
          title: Suffix
        prefix:
          anyOf:
            - type: string
            - type: 'null'
          title: Prefix
        cost_details:
          anyOf:
            - $ref: '#/components/schemas/AnalyticsCostValue'
            - type: 'null'
      type: object
      required:
        - value
      title: AnalyticsSimpleValue
    AnalyticsBarChartsValue:
      properties:
        values:
          items:
            $ref: '#/components/schemas/AnalyticsBarChartValue'
          type: array
          title: Values
      type: object
      required:
        - values
      title: AnalyticsBarChartsValue
    AnalyticsTableValue:
      properties:
        headings:
          items:
            type: string
          type: array
          title: Headings
        rows:
          items:
            additionalProperties:
              anyOf:
                - type: string
                - type: integer
                - type: number
                - $ref: '#/components/schemas/AnalyticsWorkflow'
                - $ref: '#/components/schemas/AnalyticsUser'
                - $ref: '#/components/schemas/AnalyticsKB'
                - $ref: '#/components/schemas/AnalyticsChip'
                - $ref: '#/components/schemas/AnalyticsNode'
                - $ref: '#/components/schemas/AnalyticsCostValue'
            type: object
          type: array
          title: Rows
        prefixes:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Prefixes
        suffixes:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Suffixes
      type: object
      required:
        - headings
        - rows
      title: AnalyticsTableValue
    AnalyticsPaginatedTableValue:
      properties:
        headings:
          items:
            type: string
          type: array
          title: Headings
        items:
          items:
            additionalProperties:
              anyOf:
                - type: string
                - type: integer
                - type: number
                - $ref: '#/components/schemas/AnalyticsWorkflow'
                - $ref: '#/components/schemas/AnalyticsUser'
                - $ref: '#/components/schemas/AnalyticsChip'
                - $ref: '#/components/schemas/AnalyticsNode'
            type: object
          type: array
          title: Items
        prefixes:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Prefixes
        suffixes:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Suffixes
        total:
          type: integer
          title: Total
        pages:
          type: integer
          title: Pages
        size:
          type: integer
          title: Size
        page:
          type: integer
          title: Page
      type: object
      required:
        - headings
        - items
        - total
        - pages
        - size
        - page
      title: AnalyticsPaginatedTableValue
    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
    AnalyticsCostValue:
      properties:
        value:
          type: number
          title: Value
        estimated_additional_cost:
          type: number
          title: Estimated Additional Cost
        estimated_in_progress_cost:
          type: number
          title: Estimated In Progress Cost
        estimated_interrupted_cost:
          type: number
          title: Estimated Interrupted Cost
        estimated_other_cost:
          type: number
          title: Estimated Other Cost
        message:
          type: string
          title: Message
      type: object
      required:
        - value
        - estimated_additional_cost
        - estimated_in_progress_cost
        - estimated_interrupted_cost
        - estimated_other_cost
        - message
      title: AnalyticsCostValue
    AnalyticsBarChartValue:
      properties:
        name:
          type: string
          title: Name
        values:
          additionalProperties:
            anyOf:
              - type: integer
              - type: number
          type: object
          title: Values
        value_mapping:
          anyOf:
            - additionalProperties:
                anyOf:
                  - $ref: '#/components/schemas/AnalyticsWorkflow'
                  - $ref: '#/components/schemas/AnalyticsUser'
                  - $ref: '#/components/schemas/AnalyticsKB'
              type: object
            - type: 'null'
          title: Value Mapping
      type: object
      required:
        - name
        - values
      title: AnalyticsBarChartValue
    AnalyticsWorkflow:
      properties:
        id:
          type: string
          title: Id
        group_id:
          type: string
          title: Group Id
        name:
          type: string
          title: Name
        icon:
          type: string
          title: Icon
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
      type: object
      required:
        - id
        - group_id
        - name
        - icon
      title: AnalyticsWorkflow
    AnalyticsUser:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        img:
          type: string
          title: Img
      type: object
      required:
        - id
        - name
        - img
      title: AnalyticsUser
    AnalyticsKB:
      properties:
        id:
          type: string
          title: Id
        group_id:
          type: string
          title: Group Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - group_id
        - name
      title: AnalyticsKB
    AnalyticsChip:
      properties:
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
          title: Value
        type:
          type: string
          enum:
            - success
            - outline
            - destructive
            - warning
            - default
            - secondary
          title: Type
      type: object
      required:
        - value
        - type
      title: AnalyticsChip
    AnalyticsNode:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        node_type:
          type: string
          title: Node Type
      type: object
      required:
        - id
        - name
        - node_type
      title: AnalyticsNode
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````