Contents
On this page

List Episodes - Plugixa Stream

GET /plugixa-stream/v1/admin/series/{id}/episodes

Every published, draft and scheduled episode of a title, in playing order, in the back-office shape.

Needs a user with the plugixa_stream_view capability (signed in with an Application Password or the login cookie). Administrators hold it; other roles only when you grant it.

Request

GET https://your-site.example/wp-json/plugixa-stream/v1/admin/series/2814/episodes

Path parameters

Name Type Description
id integer The title’s id

Responses

200 OK. data is the list of episodes.

Each episode has the shape described in Get Episode. The list is not paged.

{
  "success": true,
  "data": [
    {
      "id": 2815,
      "series_id": 2814,
      "number": 1,
      "title": "Chapter 1: The Planet of Peril",
      "description": "",
      "status": "publish",
      "publish_at": "",
      "url": "https://your-site.example/episode/flash-gordon-ep-1/",
      "season": 1,
      "provider": "self_hosted",
      "asset_id": "https://archive.org/download/flash-gordon-1936/chapter-1.mp4",
      "duration": 1134,
      "thumbnail_id": 0,
      "access": "auto",
      "price_override": null,
      "intro_start": null,
      "intro_end": null,
      "credits_start": null,
      "thumbnail_url": "",
      "subtitles": [],
      "audio_tracks": []
    }
  ]
}

Errors

Status Code When
401 / 403 plugixa_stream_forbidden The caller lacks the capability.
404 plugixa_stream_not_found No title with that id.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share