Videos

Add a video in a playlist

POST
https://peertube2.cpy.re/api/v1/video-playlists/{playlistId}/videos

Body

application/json
videoIdUUIDv4 | idrequired

Video to add in the playlist

Show child attributes
One of

universal identifier for the video, that can be used across instances

UUIDv4<uuid>
Example
9c9de5e8-0a1e-484a-b099-e80766180a6d

object id for the video

id>= 1
Example
42
startTimestampinteger<seconds>

Start the video at this specific timestamp

stopTimestampinteger<seconds>

Stop the video at this specific timestamp

Parameters

playlistIdid>= 1requiredpath

Playlist id

Response

200OKobject

successful operation

Response fields application/json
videoPlaylistElementobject
Show child attributes
idinteger
Example
2

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.