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

# Get Tickets Summary

> Get a comprehensive summary and analytics of all tickets

Retrieve a summary of all tickets in the system, including analytics and insights.

### Response

<ResponseField name="total_tickets" type="integer">
  Total number of tickets in the system
</ResponseField>

<ResponseField name="summary" type="string">
  Text summary of the ticket data
</ResponseField>

<ResponseField name="analytics" type="object">
  Statistical analysis of tickets

  <Expandable title="properties">
    <ResponseField name="by_status" type="object">Count of tickets by status</ResponseField>
    <ResponseField name="by_priority" type="object">Count of tickets by priority level</ResponseField>
    <ResponseField name="by_type" type="object">Count of tickets by request type</ResponseField>
    <ResponseField name="average_resolution_time" type="string">Average time to resolve tickets</ResponseField>
    <ResponseField name="peak_hours" type="array">Hours with highest ticket creation</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="insights" type="object">
  Actionable insights from the data
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl 'https://api.clever.nivara.io/summary'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "total_tickets": 150,
    "summary": "Current system has 150 tickets: 45 open, 30 in progress, 75 completed. Most common issues relate to heating systems and plumbing. Average resolution time is 2.5 days.",
    "analytics": {
      "by_status": {
        "open": 45,
        "in_progress": 30,
        "completed": 75
      },
      "by_priority": {
        "low": 30,
        "medium": 70,
        "high": 35,
        "urgent": 15
      },
      "by_type": {
        "maintenance": 60,
        "plumbing": 40,
        "electrical": 30,
        "other": 20
      },
      "average_resolution_time": "2.5 days",
      "peak_hours": [9, 10, 14, 15]
    },
    "insights": {
      "common_issues": [
        "Heating system malfunction",
        "Water leaks",
        "Electrical issues"
      ],
      "busy_locations": [
        "Downtown District",
        "North Side",
        "West End"
      ],
      "trends": {
        "daily_volume": [12, 15, 18, 14, 10],
        "weekly_pattern": "Higher volume on Mondays and Tuesdays"
      },
      "recommendations": [
        "Increase maintenance staff during peak hours 9-11 AM",
        "Implement preventive maintenance for heating systems",
        "Add specialized plumbing team for West End area"
      ]
    }
  }
  ```
</ResponseExample>
