---
title: "Paginated and filterable operator trend by month"
method: GET
path: "/api/analytics/operators/trend"
tags: ["analytics"]
---

# Paginated and filterable operator trend by month

`GET /api/analytics/operators/trend`

Paginates unique experts, then returns every monthly row for each selected expert plus one baseline month. Experts are ordered by net transitions into dropout during the visible period, descending. Admin: all. Supervisor: only supervised operators. Coordinator: only operators under assigned supervisors.

## Query parameters

- `search` string, nullable — Case-insensitive search on operator name.
- `role` 'psychologist' | 'nutritionist', nullable
- `supervisor_id` string, uuid, nullable — Admin-only supervisor filter.
- `status` 'active' | 'inactive' | 'new' | 'reported' | 'warned', nullable
- `ticket_status` 'open' | 'closed', nullable — Used only when status is reported or warned.
- `months_back` integer — Visible months; one earlier baseline month is also returned.
- `per_page` integer — Unique experts per page.
- `page` integer — Page number (1-based).

## Response `200`

Successful Response

- OperatorTrendResponse — Paginated operator trend response model.
  - `items` OperatorTrendRow[], required — Monthly rows for the paginated experts, including one baseline month
    - `operator_id` string, uuid, required — Operator UUID
    - `operator_name` string, required — Operator display name
    - `role` string, required — psychologist | nutritionist
    - `operator_status` string, nullable — Operator status
    - `month` string, date, required — First day of month
    - `total_assigned` integer, required — Total patients assigned in that month
    - `at_risk` integer, required — At risk (rischio abbandono)
    - `active` integer, required — Active / da riprenotare
    - `dropouts` integer, required — Dropouts
    - `never_started` integer, required — Never started
    - `grave` integer, required — Grave
    - `concluded` integer, required — Concluded
    - `follow_up` integer, required — Follow-up
    - `monitoring` integer, required — Monitoring
    - `last_assigned` string, date, nullable — Last assignment date (CALL_CONOSCITIVA FATTO)
    - `patients_detail` unknown
    - `created_at` string, date-time, nullable — Created at
    - `supervisor_ids` string[] — Assigned supervisor operator UUIDs
    - `supervisor_names` string[] — Assigned supervisor display names
  - `total` integer, required — Unique operators matching filters before pagination
  - `per_page` integer, required — Number of unique operators per page
  - `page` integer, required — Page number (1-based)

## Other responses

- `422` — Validation Error

---

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