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

# Get Dashboard Analytics

> Get comprehensive analytics for tenant dashboard.

This is the main endpoint for dashboard rendering.
Returns all metrics in one response:
- Real-time metrics
- Call statistics
- Capacity metrics
- Per-agent performance

Use this endpoint to populate the main dashboard view.

Example Response:
```json
{
  "tenant_id": "...",
  "generated_at": "2025-12-04T10:00:00Z",
  "period_hours": 24,
  "real_time": {
    "active_calls": 5,
    "active_participants": 10,
    "active_agents": 5
  },
  "call_statistics": {
    "total_calls": 150,
    "success_rate": 95.5,
    "avg_duration_seconds": 180
  },
  "capacity": {
    "current_active_calls": 5,
    "total_capacity": 50,
    "utilization_percentage": 10.0
  },
  "agents": [
    {
      "agent_id": "...",
      "agent_name": "Customer Support Agent",
      "calls": {...},
      "tools": {...}
    }
  ]
}
```



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json get /analytics/tenants/{tenant_id}/dashboard
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /analytics/tenants/{tenant_id}/dashboard:
    get:
      tags:
        - analytics
      summary: Get Dashboard Analytics
      description: |-
        Get comprehensive analytics for tenant dashboard.

        This is the main endpoint for dashboard rendering.
        Returns all metrics in one response:
        - Real-time metrics
        - Call statistics
        - Capacity metrics
        - Per-agent performance

        Use this endpoint to populate the main dashboard view.

        Example Response:
        ```json
        {
          "tenant_id": "...",
          "generated_at": "2025-12-04T10:00:00Z",
          "period_hours": 24,
          "real_time": {
            "active_calls": 5,
            "active_participants": 10,
            "active_agents": 5
          },
          "call_statistics": {
            "total_calls": 150,
            "success_rate": 95.5,
            "avg_duration_seconds": 180
          },
          "capacity": {
            "current_active_calls": 5,
            "total_capacity": 50,
            "utilization_percentage": 10.0
          },
          "agents": [
            {
              "agent_id": "...",
              "agent_name": "Customer Support Agent",
              "calls": {...},
              "tools": {...}
            }
          ]
        }
        ```
      operationId: get_dashboard_analytics_analytics_tenants__tenant_id__dashboard_get
      parameters:
        - name: tenant_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Tenant Id
        - name: hours
          in: query
          required: false
          schema:
            type: integer
            maximum: 168
            minimum: 1
            description: Time period in hours (1-168)
            default: 24
            title: Hours
          description: Time period in hours (1-168)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardAnalytics'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    DashboardAnalytics:
      properties:
        tenant_id:
          type: string
          title: Tenant Id
        generated_at:
          type: string
          title: Generated At
        period_hours:
          type: integer
          title: Period Hours
        real_time:
          additionalProperties: true
          type: object
          title: Real Time
        call_statistics:
          additionalProperties: true
          type: object
          title: Call Statistics
        capacity:
          additionalProperties: true
          type: object
          title: Capacity
        agents:
          items: {}
          type: array
          title: Agents
        quota:
          anyOf:
            - $ref: '#/components/schemas/QuotaInfo'
            - type: 'null'
          description: Quota and remaining calls info
      type: object
      required:
        - tenant_id
        - generated_at
        - period_hours
        - real_time
        - call_statistics
        - capacity
        - agents
      title: DashboardAnalytics
      description: Complete dashboard analytics.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    QuotaInfo:
      properties:
        tenant_id:
          type: string
          title: Tenant Id
        monthly_call_limit:
          type: integer
          title: Monthly Call Limit
          description: Maximum calls allowed per month
        calls_used_this_month:
          type: integer
          title: Calls Used This Month
          description: Calls made this month
        calls_remaining:
          type: integer
          title: Calls Remaining
          description: Calls remaining this month
        calls_usage_percentage:
          type: number
          title: Calls Usage Percentage
          description: Percentage of monthly call quota used
        max_concurrent_calls:
          type: integer
          title: Max Concurrent Calls
          description: Maximum concurrent calls allowed
        current_active_calls:
          type: integer
          title: Current Active Calls
          description: Currently active calls
        concurrent_calls_remaining:
          type: integer
          title: Concurrent Calls Remaining
          description: Available concurrent call slots
        concurrent_usage_percentage:
          type: number
          title: Concurrent Usage Percentage
          description: Percentage of concurrent capacity used
        total_minutes_used:
          type: number
          title: Total Minutes Used
          description: Total minutes used all-time
        quota_exceeded:
          type: boolean
          title: Quota Exceeded
          description: Whether quota has been exceeded
        status:
          type: string
          title: Status
          description: Tenant status (active, blocked, etc.)
      type: object
      required:
        - tenant_id
        - monthly_call_limit
        - calls_used_this_month
        - calls_remaining
        - calls_usage_percentage
        - max_concurrent_calls
        - current_active_calls
        - concurrent_calls_remaining
        - concurrent_usage_percentage
        - total_minutes_used
        - quota_exceeded
        - status
      title: QuotaInfo
      description: Tenant quota and usage information.
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````