Contents
On this page

Get Bunny Settings - Plugixa Stream

GET /plugixa-stream/v1/admin/bunny/settings

The Bunny Stream settings. The API key and token key are never returned, only whether they are set.

Needs a user with the plugixa_stream_manage_settings 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/bunny/settings

Responses

200 OK.

{
  "success": true,
  "data": {
    "library_id": "123456",
    "cdn_host": "vz-1a2b3c4d-5e6.b-cdn.net",
    "ttl": 1800,
    "has_api_key": true,
    "has_token_key": true
  }
}
Field Type Meaning
data.library_id string The video library ID
data.cdn_host string The library’s CDN host name
data.ttl integer Seconds a signed playback link lives, 60 to 86400. Defaults to 1800
data.has_api_key boolean The library API key is saved
data.has_token_key boolean The token authentication key is saved; without it links are not signed

Errors

Status Code When
401 / 403 plugixa_stream_forbidden The caller lacks the capability.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share