---
title: "Get School Analytics"
method: GET
path: "/admin/schools/{school_id}/analytics"
tags: ["Admin - Schools"]
---

# Get School Analytics

`GET /admin/schools/{school_id}/analytics`

Get comprehensive analytics for a school, for one school year, including
all teachers and classes of that year.
Only accessible by admin users.

## Path parameters

- `school_id` string, required — The ID of the school

## Query parameters

- `weeks` integer
- `school_year` string, nullable

## Response `200`

Successful Response

- SchoolAnalyticsResponse — Complete analytics response for a school
  - `school_id` string, required
  - `school_name` string, required
  - `school_domain` string, nullable
  - `total_teachers` integer, required
  - `total_classes` integer, required
  - `total_students` integer, required
  - `total_exercises_completed` integer, required
  - `total_homework_exercises` integer, required
  - `total_teacher_exams` integer, required
  - `total_courses` integer, required
  - `total_teacher_assignments` integer, required
  - `total_chat_words` integer, required
  - `total_time_spent_hours` number, required
  - `active_students_last_month` integer, required
  - `weekly_activity` object, required
  - `weekly_homework_activity` object, required
  - `teachers` SchoolTeacherAnalytics[], required
    - `teacher_id` string, required
    - `teacher_name` string, required
    - `teacher_email` string, required
    - `total_classes` integer, required
    - `total_students` integer, required
    - `total_exercises_completed` integer, required
    - `total_homework_exercises` integer, required
    - `total_teacher_exams` integer, required
    - `total_courses` integer, required
    - `total_teacher_assignments` integer, required
    - `total_chat_words` integer, required
    - `total_time_spent_hours` number, required
    - `active_students_last_month` integer, required
    - `segments` string[]
    - `weekly_activity` object, required
    - `weekly_homework_activity` object, required
  - `classes` SchoolClassAnalytics[], required
    - `class_id` string, required
    - `class_name` string, required
    - `teacher_name` string, required
    - `total_students` integer, required
    - `active_students_last_month` integer, required
    - `total_exercises_completed` integer, required
    - `total_homework_exercises` integer, required
    - `total_chat_words` integer, required
    - `total_time_spent_hours` number, required
    - `weekly_activity` object, required
    - `weekly_homework_activity` object, required
  - `school_year` string, required
  - `available_school_years` string[]
  - `weeks_analyzed` integer, required
  - `analysis_start_date` string, date-time, required
  - `analysis_end_date` string, date-time, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-09** `e75413b9576a` — 3 info
  - added the new optional `query` request parameter `school_year`
  - added the optional property `available_school_years` to the response with the `200` status
  - added the required property `school_year` to the response with the `200` status
- **2026-09-02** `8d495ed916c6` — 2 breaking
  - the response property `school_domain` became optional for the status `200`
  - response property `school_domain` list-of-types was widened by adding types `null` to media type `application/json` of response `200`

[Change history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/admin/schools/:school_id/analytics/get.md)

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc.dev/excellence-ai/apis/excellence-learning/revisions/2a0c1636fd3b?raw)
