course_statistics_get
# course_statistics_get
Reads class or lesson viewing statistics for a period, or the statistics overview (totals and the five most-viewed classes and lessons) in the Course app (pApp C00007). format csv also returns the page as the original CSV download.
## Inputs
| Field | Required here | Contract |
| --- | --- | --- |
| `view` | Yes | one of: `course-statistics`, `session-statistics`, `course-overview` (by `kind`) |
| `view.query` | No | When `view.kind` is `course-statistics`: object; default `{"page":1,"limit":15}` |
| `view.query.start` | No | When `view.kind` is `course-statistics`: string; pattern `^\d{4}-\d{2}-\d{2}$`; Period start (YYYY-MM-DD). Give start and end together (YYYY-MM-DD, from 2022-01-01); end is on or after start and less than 93 days after it (at most 93 calendar days), as the statistics date range allows. For a longer span, read consecutive periods. |
| `view.query.end` | No | When `view.kind` is `course-statistics`: string; pattern `^\d{4}-\d{2}-\d{2}$`; Period end (YYYY-MM-DD). Give start and end together (YYYY-MM-DD, from 2022-01-01); end is on or after start and less than 93 days after it (at most 93 calendar days), as the statistics date range allows. For a longer span, read consecutive periods. |
| `view.query.page` | No | When `view.kind` is `course-statistics`: integer; minimum 1; maximum 10000; default `1` |
| `view.query.limit` | No | When `view.kind` is `course-statistics`: `15` or `30` or `50` or `100`; default `15` |
| `view.format` | No | When `view.kind` is `course-statistics`: `csv`; csv: also return this page as the original CSV download (same page only). |
| `view.query` | No | When `view.kind` is `session-statistics`: object; default `{"page":1,"limit":15}` |
| `view.query.start` | No | When `view.kind` is `session-statistics`: string; pattern `^\d{4}-\d{2}-\d{2}$`; Period start (YYYY-MM-DD). Give start and end together (YYYY-MM-DD, from 2022-01-01); end is on or after start and less than 93 days after it (at most 93 calendar days), as the statistics date range allows. For a longer span, read consecutive periods. |
| `view.query.end` | No | When `view.kind` is `session-statistics`: string; pattern `^\d{4}-\d{2}-\d{2}$`; Period end (YYYY-MM-DD). Give start and end together (YYYY-MM-DD, from 2022-01-01); end is on or after start and less than 93 days after it (at most 93 calendar days), as the statistics date range allows. For a longer span, read consecutive periods. |
| `view.query.page` | No | When `view.kind` is `session-statistics`: integer; minimum 1; maximum 10000; default `1` |
| `view.query.limit` | No | When `view.kind` is `session-statistics`: `15` or `30` or `50` or `100`; default `15` |
| `view.format` | No | When `view.kind` is `session-statistics`: `csv`; csv: also return this page as the original CSV download (same page only). |
| `view.query` | No | When `view.kind` is `course-overview`: object; default `{}` |
| `view.query.start` | No | When `view.kind` is `course-overview`: string; pattern `^\d{4}-\d{2}-\d{2}$`; Period start (YYYY-MM-DD). Give start and end together (YYYY-MM-DD, from 2022-01-01); end is on or after start and less than 93 days after it (at most 93 calendar days), as the statistics date range allows. For a longer span, read consecutive periods. |
| `view.query.end` | No | When `view.kind` is `course-overview`: string; pattern `^\d{4}-\d{2}-\d{2}$`; Period end (YYYY-MM-DD). Give start and end together (YYYY-MM-DD, from 2022-01-01); end is on or after start and less than 93 days after it (at most 93 calendar days), as the statistics date range allows. For a longer span, read consecutive periods. |
| `view.includePlayCounts` | No | When `view.kind` is `course-overview`: boolean; Also read total play counts (an endpoint the console defines but shows on no screen). |