Contents
On this page

Event Catalogue - Plugixa Activity Log

GET /plugixa-activity-log/v1/events/catalogue

Every kind of event the plugin can record on this site, whether each is switched on, and whether the monitor behind it is running.

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

Request

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

Responses

200 OK. data is the catalogue, one entry per event code.

{
  "success": true,
  "data": [
    {
      "code": 1003,
      "group": "authentication",
      "group_label": "Sign-ins",
      "subgroup": "Sign-ins",
      "severity": "medium",
      "object_type": "user",
      "action": "failed",
      "message": "Failed sign-in attempt for “{attempted}”: the password was wrong.",
      "module": "authentication",
      "default_enabled": true,
      "enabled": true,
      "locked": false,
      "monitor_running": true
    }
  ]
}
Field Type Meaning
data[].code integer The event code, as the event_code filter takes it
data[].group string The group key
data[].severity string The severity this kind of event is recorded with
data[].message string The message template, with {placeholders}
data[].module string The id of the monitor or module that records it
data[].default_enabled boolean Whether it is on out of the box
data[].enabled boolean Whether it is on now
data[].locked boolean true for codes 9000 and up: the log’s own record of changes to it, which is always on
data[].monitor_running boolean false when the monitor behind it is switched off, in which case nothing is recorded whatever enabled says

The catalogue only lists events of modules that are installed: Pro adds its own.

Errors

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-activity-log/v1/events/catalogue" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-activity-log/v1/events/catalogue');
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/events/catalogue', {
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data } = await response.json();

Quick Links

Share