Contents
On this page

Delete Playlist - Plugixa Video

DELETE /pvx/v1/playlists/{id}

Delete a playlist. Its videos are not touched.

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.

Note. This is permanent: playlists do not go to the trash, unlike videos, channels and series.

Request

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

Path parameters

Name Type Description
id integer The playlist’s id

Responses

200 OK. The playlist is gone.

{
  "success": true,
  "data": {
    "id": 1550
  }
}
Field Type Meaning
data.id integer The id of the deleted playlist

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" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/pvx/v1/playlists/1550');
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', {
  method: 'DELETE',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share