v1

latestOpenAPI 3.0.0AGPLv3.02026-07-14186117194.3 KB
Video

Notify user is watching a video

Call this endpoint regularly (every 5-10 seconds for example) to notify the server the user is watching the video. After a while, PeerTube will increase video's viewers counter. If the user is authenticated, PeerTube will also store the current player time.

post/api/v1/videos/{id}/views

Path parameters

integer required
OR
string uuid required
OR
string required

translation of a uuid v4 with a bigger alphabet to have a shorter uuid

Example:42

The object id, uuid or short uuid

Request body

currentTimeinteger required

timestamp within the video, in seconds

viewEvent'seek'

Event since last viewing call:

  • seek - If the user seeked the video

Example request

{
  "currentTime": 5
}

Response

successful operation