Contents
On this page

Stop Screen - Plugixa Stream

DELETE /plugixa-stream/v1/me/screens/{id}

Stop another screen of the caller’s account. It learns at its next heartbeat.

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

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

Path parameters

Name Type Description
id string The 12-character screen id from List Screens

Responses

200 OK. data is the screens, as in List Screens.

{
  "success": true,
  "data": {
    "limit": 2,
    "screens": [
      {
        "id": "3f9a1c07be52",
        "label": "Chrome on Windows",
        "watching": "Flash Gordon",
        "seen": 12,
        "current": true
      }
    ]
  }
}

Errors

Status Code When
401 plugixa_stream_login_required Signed out.
404 plugixa_stream_not_found No other playing screen with that id.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share