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.
Video
Addview is an example object payload from PeerTube, with 9 top-level fields. It illustrates the shape of data this provider's APIs accept or return.
{
"operationId": "addView",
"method": "POST",
"path": "/api/v1/videos/{id}/views",
"summary": "Notify user is watching a video",
"description": "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.",
"tags": [
"Video"
],
"parameters": [
{
"name": null,
"in": null,
"required": false,
"description": "",
"schema": {}
}
],
"requestBody": {
"contentType": "application/json",
"schema": {
"$ref": "#/components/schemas/UserViewingVideo"
},
"example": {}
},
"responses": {
"204": {
"description": "successful operation",
"examples": {}
}
}
}
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.