Playlist API
Create video playlist
This API allows you to create a video playlist.
Headers
Body
Response
curl --location 'https://api.aiozstream.network/api/playlists/create' \
--header 'Authorization: Bearer your_access_token_here' \
--form 'name="your playlist name"'Get user playlists
Headers
Body
Response
curl --location 'https://api.aiozstream.network/api/playlists' \
--header 'Authorization: Bearer your_access_token_here' \
--form 'Offset="0"' \
--form 'Limit="10"' \
--form 'sort_by="name"' \
--form 'order_by="asc"' \
--form 'search="your playlist name"'Get playlist by id
This API allows you to get a playlist by id. Inside the playlist, you will get the videos you have added to the playlist.
Note: If sort_by and order_by parameters are not provided, playlist items will be returned in their custom order (the order in which they were arranged in the playlist).
Parameters
Headers
Response
curl --location 'https://api.aiozstream.network/api/playlists/playlist_id' \
--header 'Authorization: Bearer your_access_token_here'Update playlist by id
This API allows you to update a playlist by id with form-data.
Field description:
- file (file): The thumbnail of the playlist. Without thumbnail, the playlist will use the default thumbnail of the first video in the playlist. The format must be
jpg,jpeg, orpng.
Parameters
Headers
Body
Response
curl --location --request PATCH 'https://api.aiozstream.network/api/playlists/playlist_id' \
--header 'Authorization: Bearer your_access_token_here' \
--form 'name="new_playlist_name"' \
--form 'file=@"/path/to/your/file.jpg"'Add video to playlist
This API allows you to add a video to a playlist with body json.
The request body when adding a video to a playlist will be like this:
{
"video_id": "video_id"
}Parameters
Headers
Body
Response
curl --location 'https://api.aiozstream.network/api/playlists/playlist_id/items' \
--header 'Authorization: Bearer your_access_token_here' \
--header 'Content-Type: application/json' \
--data '{
"video_id": "video_id"
}'Move video on playlist
This API allows you to move a video on a playlist.
Field description:
- playlist_id (string): The unique identifier of the playlist
- current_id (string): The unique identifier of the video you want to move.
- next_id (string): The unique identifier of the video you want to move after the current video.
- previous_id (string): The unique identifier of the video you want to move before the current video.
The request body when moving a video on a playlist will be like this:
Examples:
-
Move to top:
{ "current_id": "current_item_id", "next_id": "next_item_id" } -
Move to bottom:
{ "current_id": "current_item_id", "previous_id": "last_item_id" } -
Move between two items:
{ "current_id": "current_item_id", "next_id": "next_item_id", "previous_id": "previous_item_id" }
Note: The current_id is always required. Use next_id and previous_id to specify the new position.
Important: If the specified position is invalid (e.g., wrong position of next_id or previous_id),
the operation will fail and return an error. The playlist will remain unchanged in such cases.
To move a video to the top of the playlist, set next_id to the ID of the first video in the playlist.
To move a video to the bottom, set previous_id to the ID of the last video in the playlist.
If both next_id and previous_id are provided, the video will be placed between these two videos.
Parameters
Headers
Body
Response
curl --location --request PUT 'https://api.aiozstream.network/api/playlists/playlist_id/items' \
--header 'Authorization: Bearer your_access_token_here' \
--header 'Content-Type: application/json' \
--data '{
"current_id": "current_item_id",
"next_id": "next_item_id",
"previous_id": "previous_item_id"
}'Delete item from playlist
This API allows you to delete a playlist item by playlist id.
Parameters
Headers
Response
curl --location --request DELETE 'https://api.aiozstream.network/api/playlists/playlist_id/items/item_id' \
--header 'Authorization: Bearer your_access_token_here'Delete playlist thumbnail
This API allows you to delete a playlist thumbnail.
Parameters
Headers
Response
curl --location --request DELETE 'https://api.aiozstream.network/api/playlists/playlist_id/thumbnail' \
--header 'Authorization: Bearer your_access_token_here' \
--data ''Delete playlist
This API allows you to delete a video playlist
Parameters
Headers
Response
curl --location --request DELETE 'https://api.aiozstream.network/api/playlists/playlist_id' \
--header 'Authorization: Bearer your_access_token_here'