# Get the collective work session report `GET /api/v1/coaches/work-sessions` Reports work sessions for all coaches in 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 day in YYYY-MM-DD format. Defaults to the first day of the current month. - `to` (date string) — Inclusive last day in YYYY-MM-DD format. Defaults to the last day of the current month. - `page` (integer) — One-based page number, with up to 50 session rows split by day. ## 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" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "from=2026-11-01" \ --data-urlencode "to=2026-11-30" \ --data-urlencode "page=1" ``` ## Response **200 OK** Returns daily session rows, period totals, open sessions, and pagination. Daily totals cover the entire day even if its sessions span pages. Example with fictional data and selected fields. ```json { "timezone": "Europe/Rome", "server_now": "2026-11-14T12:00:00Z", "from": "2026-11-01", "to": "2026-11-30", "summary": { "duration_seconds": 5400, "worked_days": 1, "open_sessions": 0, "worked_coaches": 1 }, "days": [ { "date": "2026-11-12", "duration_seconds": 5400, "sessions": [ { "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, "period_seconds": 5400, "coach_firstname": "Sam", "coach_surname": "Example" } ], "continued": false } ], "open_sessions": [], "pagination": { "page": 1, "pageSize": 50, "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.