---
title: "Get Set Counts For Every Pupil"
method: GET
path: "/Timetable/Admin/SetCounts"
tags: ["Timetable"]
---

# Get Set Counts For Every Pupil

`GET /Timetable/Admin/SetCounts`

**Requires permission:** *TimetableAdmin*

How many sets each pupil belongs to this academic year, with their timetabled lessons per two-week cycle and a flag for anyone outside their year group's normal band. Also returns the year group / house / form values present on the roll so the filters offer real options. Four projected queries, no N+1 — this is the same payload the pupil PDF export selects from.

## Query parameters

- `yearGroup` string, nullable
- `houseId` string, guid, nullable
- `form` string, nullable
- `search` string, nullable
- `page` integer, required
- `pageSize` integer, required
- `includes` string[], nullable
- `sort` string, nullable
- `filter` string, nullable

## Response `200`

Success - Returned set counts

- GetTimetableSetCountsResponse
  - `students` TimetableAdminPerson[]
    - `upi` string, guid, nullable
    - `name` string
    - `yearGroup` string, nullable
    - `house` string, nullable
    - `houseId` string, guid, nullable
    - `form` string, nullable
    - `jobTitle` string, nullable
    - `setCount` integer
    - `lessonsPerCycle` integer
    - `isOutlier` boolean
    - `subjects` string[]
  - `yearGroups` string[]
  - `houses` TimetableAdminLookup[]
    - `id` string, guid
    - `name` string
  - `forms` string[]
  - `yearGroupNorms` TimetableYearGroupNorm[]
    - `yearGroup` string
    - `medianSetCount` integer
    - `lowest` integer
    - `highest` integer
    - `pupilCount` integer
  - `meta` Meta
    - `page` integer
    - `pageSize` integer
    - `total` integer

## Other responses

- `401` — Unauthorized
- `403` — Forbidden - Requires TimetableAdmin

## Changes

- **2026-08-27** `fb36fab6825e` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/tonbridge/apis/tonbridge-app-api/changes/Timetable/Admin/SetCounts/get.md)

---

[API](https://skmtc.dev/tonbridge/apis/tonbridge-app-api.md) · [All operations](https://skmtc.dev/tonbridge/apis/tonbridge-app-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tonbridge/tonbridge-app-api/revisions/223cb0feedeb/schema)
