Contents
On this page

Delete Series - Plugixa Video

DELETE /pvx/v1/series/{id}

Move a series to the WordPress trash.

Needs a user (signed in with an Application Password or the login cookie) who has the plugixa_video_delete capability and the right to delete this series. Needs Plugixa Video Pro with the Series app on in Plugixa Video -> App manager; with it off, this route answers 404.

Note. The episodes are not touched: they stay videos of type episode pointing at the trashed series. A series already in the trash answers 500 when deleted again.

Request

DELETE https://your-site.example/wp-json/pvx/v1/series/910

Path parameters

Name Type Description
id integer The series’ id

Responses

200 OK. The series is in the trash.

{
  "success": true,
  "data": {
    "id": 910
  }
}
Field Type Meaning
data.id integer The id of the series moved to the trash

Errors

Status Code When
404 plugixa_video_not_found No series with that id.
401 / 403 plugixa_video_forbidden The caller may not delete this series.
500 plugixa_video_delete_failed WordPress could not move it to the trash.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share