# Analytics Usage analytics and viewing history ## Endpoints ### POST /api/v1/analytics/events **Authentication:** Required (Bearer JWT) #### Request Body `Content-Type: application/json` See `docs/api/openapi.json` for the full schema. #### Responses | Status | Description | | ------ | --------------------- | | 200 | Event recorded | | 401 | Unauthorized | | 500 | Internal server error | --- ### GET /api/v1/analytics/most-viewed **Authentication:** Required (Bearer JWT) #### Parameters | Name | In | Required | Description | | -------- | ----- | -------- | ------------------------- | | `limit` | query | No | Maximum number of results | | `offset` | query | No | Pagination offset | #### Responses | Status | Description | | ------ | --------------------- | | 200 | Most viewed media | | 401 | Unauthorized | | 500 | Internal server error | --- ### GET /api/v1/analytics/recently-viewed **Authentication:** Required (Bearer JWT) #### Parameters | Name | In | Required | Description | | -------- | ----- | -------- | ------------------------- | | `limit` | query | No | Maximum number of results | | `offset` | query | No | Pagination offset | #### Responses | Status | Description | | ------ | --------------------- | | 200 | Recently viewed media | | 401 | Unauthorized | | 500 | Internal server error | --- ### GET /api/v1/media/{id}/progress **Authentication:** Required (Bearer JWT) #### Parameters | Name | In | Required | Description | | ---- | ---- | -------- | ------------- | | `id` | path | Yes | Media item ID | #### Responses | Status | Description | | ------ | --------------------- | | 200 | Watch progress | | 401 | Unauthorized | | 404 | Not found | | 500 | Internal server error | --- ### PUT /api/v1/media/{id}/progress **Authentication:** Required (Bearer JWT) #### Parameters | Name | In | Required | Description | | ---- | ---- | -------- | ------------- | | `id` | path | Yes | Media item ID | #### Request Body `Content-Type: application/json` See `docs/api/openapi.json` for the full schema. #### Responses | Status | Description | | ------ | --------------------- | | 200 | Progress updated | | 400 | Bad request | | 401 | Unauthorized | | 404 | Not found | | 500 | Internal server error | ---