pinakes/docs/api/analytics.md
NotAShelf 7a0a009ced
docs: auto-generate API route documentation
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id0d1f9769b7ccdbf83d5fa78adef62e46a6a6964
2026-03-22 17:58:40 +03:00

2.1 KiB

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