# List collective work session changes `GET /api/v1/coaches/work-sessions/history` Lists work session changes across the selected sport. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Coaches → Read**. ## Headers - `X-Sport-Id` (integer, required) — The sport ID from [List sports](/api/sports/list.md). Use the sport the record belongs to. ## Query parameters - `from` (date string) — Inclusive first change date. Use with to. - `to` (date string) — Inclusive last change date. Use with from. - `action` (string) — Use start, end, create, update, delete, or office. The office filter selects operator changes. - `page` (integer) — One-based page number. Each page contains up to 20 events. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --get \ --url "https://api.asdincloud.com/api/v1/coaches/work-sessions/history" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "action=office" \ --data-urlencode "page=1" ``` ## Response **200 OK** Returns changes with before and after values, the affected coach, and the recorded actor. Includes changes to removed sessions. Example with fictional data and selected fields. ```json { "timezone": "Europe/Rome", "data": [ { "id": 51, "session_id": 38, "staff_id": 21, "sport_id": 3, "occurred_at": "2026-11-13T09:00:00Z", "actor_type": "operator", "actor_name": "Alex Example", "action": "create", "reason": "Recorded from the attendance log.", "before": null, "after": { "id": 38, "staff_id": 21, "sport_id": 3, "started_at": "2026-11-12T16:00:00Z", "ended_at": "2026-11-12T17:30:00Z", "source": "manual", "corrected": false, "version": 1, "duration_seconds": 5400, "created_at": "2026-11-13T09:00:00Z", "updated_at": "2026-11-13T09:00:00Z", "deleted_at": null }, "coach_firstname": "Sam", "coach_surname": "Example" } ], "pagination": { "page": 1, "pageSize": 20, "total": 1 } } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The requested record was not found. - `422` — The request or date interval is invalid. - `503` — Work sessions are temporarily unavailable.