Contents
Get Encoding Job - Plugixa Stream
GET /plugixa-stream/v1/admin/transcode/episodes/{id}
Where an episode’s encode is.
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/transcode/episodes/2815
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The episode’s id |
Responses
200 OK.
{
"success": true,
"data": {
"status": "running",
"progress": 42,
"renditions": [1080, 720, 480],
"audio": 1,
"subtitles": 0,
"error": "",
"current": true,
"started": 1763370120,
"finished": 0,
"encodable": true,
"available": true
}
}
| Field | Type | Meaning |
|---|---|---|
data.status |
string |
none, queued, running, done or failed |
data.progress |
integer |
Percent |
data.renditions |
integer[] |
Heights being made |
data.audio |
integer |
Audio tracks found in the file. Also subtitles |
data.error |
string |
Why it failed |
data.current |
boolean |
The job was made from the file the episode has now |
data.started |
integer |
Unix time. Also finished, 0 until then |
data.encodable |
boolean |
The episode’s video is a Media Library file on this server |
data.available |
boolean |
ffmpeg was found |
Once done and current, the episode plays the HLS stream instead of the uploaded file.
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
plugixa_stream_forbidden |
The caller lacks the capability. |
404 |
plugixa_stream_not_found |
No episode with that id. |
400 |
rest_invalid_param |
id is below 1. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-stream/v1/admin/transcode/episodes/2815" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/admin/transcode/episodes/2815');
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/transcode/episodes/2815', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share