Contents
On this page

List Screens - Plugixa Stream

GET /plugixa-stream/v1/me/screens

The caller’s screens playing now, this one first, and how many may play at once.

Any signed-in user (an Application Password, or the login cookie with an X-WP-Nonce header). Signed out, it answers 401 plugixa_stream_login_required. It always acts on the caller’s own account. A screen is the login session, or the browser when there is none. Accounts with plugixa_stream_edit have no limit.

Request

GET https://your-site.example/wp-json/plugixa-stream/v1/me/screens

Responses

200 OK.

{
  "success": true,
  "data": {
    "limit": 2,
    "screens": [
      {
        "id": "3f9a1c07be52",
        "label": "Chrome on Windows",
        "watching": "Flash Gordon",
        "seen": 12,
        "current": true
      },
      {
        "id": "a81e44d90c3b",
        "label": "Safari on iOS",
        "watching": "Flash Gordon",
        "seen": 40,
        "current": false
      }
    ]
  }
}
Field Type Meaning
data.limit integer Screens at once: the VIP plan’s own limit, else the site’s screens_limit setting. 0 means no limit
data.screens[].id string A short id for the screen, for Stop Screen
data.screens[].label string Browser and system, such as Chrome on Windows
data.screens[].watching string The title it plays
data.screens[].seen integer Seconds since its last heartbeat
data.screens[].current boolean The screen making this request

A screen silent for 2 minutes no longer counts.

Errors

Status Code When
401 plugixa_stream_login_required Signed out.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share