Contents
On this page

Remove Video from Playlist - Plugixa Video

DELETE /pvx/v1/playlists/{id}/items/{video_id}

Take a video out of a playlist. The video itself is not touched, and a video that is not in the playlist is not an error.

Needs a user (signed in with an Application Password or the login cookie) who manages the playlist: its owner, or a user who may edit other people’s videos (editors and administrators). Needs the Playlists app on in Plugixa Video -> App manager; with it off, this route answers 404.

Request

DELETE https://your-site.example/wp-json/pvx/v1/playlists/1550/items/840

Path parameters

Name Type Description
id integer The playlist’s id
video_id integer The video to remove

Responses

200 OK. data lists the playlist’s videos now.

{
  "success": true,
  "data": {
    "video_ids": [838]
  }
}
Field Type Meaning
data.video_ids integer[] The playlist’s video ids in order, unpublished ones included

Errors

Status Code When
401 plugixa_video_login_required Signed out.
404 plugixa_video_not_found No playlist with that id, or a private playlist of someone else.
403 plugixa_video_forbidden The caller can see the playlist but does not manage it.

Plus the errors every endpoint can return.

Examples

curl -s -X DELETE "https://your-site.example/wp-json/pvx/v1/playlists/1550/items/840" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/pvx/v1/playlists/1550/items/840');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/pvx/v1/playlists/1550/items/840', {
  method: 'DELETE',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share