Contents
On this page

List Monitors - Plugixa Activity Log

GET /plugixa-activity-log/v1/monitors

Every monitor and module of the plugin, with whether it is switched on and whether it is actually running. This is the list behind Plugixa Activity Log -> Monitors.

Needs the view access level (who can call what).

Note. The list holds every module, not only the monitors that record events: features such as dashboard, views, export PRO or rules PRO are in it too, told apart by category. Switching one of those off removes its REST routes.

Request

GET https://your-site.example/wp-json/plugixa-activity-log/v1/monitors

Responses

200 OK. data is every module, in display order.

{
  "success": true,
  "data": [
    {
      "id": "authentication",
      "category": "monitors",
      "order": 10,
      "label": "Sign-ins",
      "desc": "Successful and failed sign-ins, sign-outs and password resets.",
      "icon": "login",
      "core": false,
      "deps": [],
      "flag": true,
      "enabled": true,
      "available": true
    }
  ]
}
Field Type Meaning
data[].id string The module’s id, used by Update Monitor and by the module filter of the log
data[].category string core, monitors, insight, configuration or tools
data[].core boolean true for the modules that cannot be switched off
data[].deps string[] Ids of modules this one needs
data[].flag boolean Whether it is switched on
data[].enabled boolean Whether it is actually running. false while flag is true when a module it depends on is off
data[].available boolean For a monitor of another plugin (WooCommerce, Yoast and others): whether that plugin is active. Always true for the rest

Errors

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-activity-log/v1/monitors" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-activity-log/v1/monitors');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const response = await fetch('https://your-site.example/wp-json/plugixa-activity-log/v1/monitors', {
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data } = await response.json();

Quick Links

Share