Video Playlists
Operations dealing with playlists of videos. Playlists are bound to users and/or channels.
List available playlist privacy policies
Response
successful operation
List video playlists
Parameters
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
sortstringquerySort column
Response
successful operation
Create a video playlist
If the video playlist is set as public, videoChannelId is mandatory.
Body
multipart/form-dataobjectthumbnailfileimage/jpegdisplayNamestringrequiredVideo playlist display name
thumbnailfilestring<binary>Video playlist thumbnail file
privacyVideoPlaylistPrivacySet123Video playlist privacy policy (see /video-playlists/privacies)
descriptionstringVideo playlist description
videoChannelIdidVideo channel in which the playlist will be published
Response
successful operation
Authorization
OAuth2oauth2Authenticating 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.
Get a video playlist
Parameters
Playlist id
Response
successful operation
Update a video playlist
If the video playlist is set as public, the playlist must have a assigned channel.
Body
multipart/form-dataobjectthumbnailfileimage/jpegdisplayNamestringVideo playlist display name
thumbnailfilestring<binary>Video playlist thumbnail file
privacyVideoPlaylistPrivacySet123Video playlist privacy policy (see /video-playlists/privacies)
descriptionstringVideo playlist description
videoChannelIdidVideo channel in which the playlist will be published
Parameters
Playlist id
Response
successful operation
Authorization
OAuth2oauth2Authenticating 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.
Delete a video playlist
Parameters
Playlist id
Response
successful operation
Authorization
OAuth2oauth2Authenticating 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.
List videos of a playlist
Parameters
Playlist id
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
Response
successful operation
Add a video in a playlist
Body
videoIdUUIDv4 | idrequiredVideo to add in the playlist
startTimestampinteger<seconds>Start the video at this specific timestamp
stopTimestampinteger<seconds>Stop the video at this specific timestamp
Parameters
Playlist id
Response
successful operation
Authorization
OAuth2oauth2Authenticating 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.
Reorder playlist elements
Body
startPositioninteger>= 1requiredStart position of the element to reorder
insertAfterPositioninteger>= 0requiredNew position for the block to reorder, to add the block before the first element
reorderLengthinteger>= 1How many element from startPosition to reorder
Parameters
Playlist id
Response
successful operation
Authorization
OAuth2oauth2Authenticating 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.
Update a playlist element
Body
startTimestampinteger<seconds>Start the video at this specific timestamp
stopTimestampinteger<seconds>Stop the video at this specific timestamp
Parameters
Response
successful operation
Authorization
OAuth2oauth2Authenticating 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.
Delete an element from a playlist
Parameters
Response
successful operation
Authorization
OAuth2oauth2Authenticating 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.
Check video exists in my playlists
Parameters
The video ids to check
Response
successful operation
Authorization
OAuth2oauth2Authenticating 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.
Search playlists
Parameters
searchstringrequiredqueryString to search. If the user can make a remote URI search, and the string is an URI then the PeerTube instance will fetch the remote object and add it to its database. Then, you can use the REST API to fetch the complete playlist information and interact with it.
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
searchTargetstringlocalsearch-indexqueryIf the administrator enabled search index support, you can override the default search target.
Warning: If you choose to make an index search, PeerTube will get results from a third party service. It means the instance may not yet know the objects you fetched. If you want to load video/channel information:
- If the current user has the ability to make a remote URI search (this information is available in the config endpoint), then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
- If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch the data from the origin instance API
sortstringquerySort column
hoststringqueryFind elements owned by this host
uuidsanyqueryFind elements with specific UUIDs
Response
successful operation
search index unavailable
