Contents
On this page
Plugixa Activity Log REST API - Plugixa Activity Log
The integration surface for Plugixa Activity Log: read the log page by page or poll it for new events, read the dashboard figures, switch monitors and kinds of event on or off, and keep saved views. With Pro you can also export, build and schedule reports, manage alert rules and mirrors, end sign-in sessions and read the archive. Enough to feed a SIEM or a monitoring tool, build your own dashboard, or automate the setup of many sites.
No route creates, edits or deletes an event. That is the design, not an omission. Events are written inside WordPress by the monitors; the API cannot forge one and cannot erase one. The writes here change configuration, which affects what is recorded from now on and rewrites no history.
Everything the admin app does, it does through this API, under the namespace plugixa-activity-log/v1. Every permission the interface shows is checked again at the endpoint, not in the page.
Base URL
https://your-site.example/wp-json/plugixa-activity-log/v1
On a site with plain permalinks, pass the route as a parameter instead:
https://your-site.example/?rest_route=/plugixa-activity-log/v1/events
GET /wp-json/plugixa-activity-log/v1 lists every route with its parameters, including descriptions of the event filters.
Authentication
The plugin has no API keys of its own. A script signs in as a WordPress user with an Application Password, created on that user’s profile under Application Passwords. WordPress offers them only on HTTPS sites, except on a local site. Send it with HTTP Basic authentication:
curl -s "https://your-site.example/wp-json/plugixa-activity-log/v1/events?min_severity=high" \
-u "admin:$WP_APP_PASSWORD"
The request then runs as that user, with that user’s access. Use a dedicated account with only the access the script needs.
| Caller | How it signs in |
|---|---|
| A script or another system | An Application Password, over HTTP Basic |
| The admin app | The logged-in cookie plus an X-WP-Nonce header holding a wp_rest nonce |
A cookie request without the nonce is treated by WordPress as signed out. A wrong Application Password is refused by WordPress itself before the plugin is asked.
Who can call what
Access is worked out from the user’s role each time; nothing is stored on the role. Each endpoint page names the level it needs.
| Level | Who has it |
|---|---|
| view | Administrators, and the roles listed under Settings -> Access as allowed to see the log |
| settings | Administrators. On multisite, network administrators only |
| export PRO | Administrators, and the roles listed as allowed to export |
| signed in PRO | Any signed-in user, for their own sign-in sessions |
On multisite, a site administrator is confined to their own site by the server, whatever site_id says. An event on another site answers 404, not 403, so its existence is not revealed. See Access and Multisite.
A route whose module is off does not exist. Switching a module off under Plugixa Activity Log -> Monitors removes its routes, which then answer 404. Pro routes are not in the free build at all: no licence check refuses them, the code is simply not there.
Responses
Every successful JSON response is wrapped the same way:
{
"success": true,
"data": [],
"meta": { "has_more": false, "next_before_id": null, "newest_id": null, "gap": false }
}
meta is only present when it has something in it. Booleans are real booleans and ids are integers. Times are UTC, in the form each resource documents: events and saved views use 2026-11-12T09:30:00Z, alert rules, mirrors and report schedules use 2026-11-12 09:30:00, and sign-in sessions use Unix timestamps.
Downloads (the CSV export and reports PRO) are not wrapped: the body is the file, with a Content-Disposition: attachment header.
Lists and pagination
The log and the archive PRO are paged by cursor, not by page number. There is no page and no offset: a cursor jumps straight to its place, so the last page of a ten-million-row log costs what the first did.
| Parameter | Type | Default | Description |
|---|---|---|---|
per_page |
integer |
The Events per page setting (50) | 1 to 200 |
before_id |
integer |
Only events older than this id. Pass meta.next_before_id to get the next page |
|
after_id |
integer |
Only events newer than this id: the live tail | |
with_total |
boolean |
false |
Also count the matches, into meta.total |
These four are enforced: a per_page of 500 is a 400. Pages come back newest first. To read everything, follow meta.next_before_id until meta.has_more is false. To read only what is new since your last call, keep the highest id you have seen (meta.newest_id) and pass it as after_id next time. When meta.gap is true, more new events arrived than fit in one page: reload from the top.
meta key |
Meaning |
|---|---|
has_more |
There is another page in the direction you are reading |
next_before_id |
The id of the last event on this page, or null for an empty page |
newest_id |
The id of the first (newest) event on this page, or null |
gap |
An after_id poll came back full |
total |
With with_total: the number of matching events |
total_capped |
true when a filtered count stopped at 10,000: read it as “10,000 or more” |
total_approximate |
true when nothing is filtered and the log holds more than 10,000 events: the total is the database’s own estimate |
The filter parameters are listed on List Events. The other lists (views, monitors, rules, mirrors, schedules, sessions) are short and come back whole, without paging.
Endpoints
| Resource | Endpoints |
|---|---|
| Events | List, Get, Catalogue, Switch events |
| Stats | Get |
| Monitors | List, Update |
| Views | List, Create, Update, Delete |
| Exports PRO | Download |
| Reports PRO | Run |
| Report schedules PRO | List, Create, Update, Delete, Run now |
| Alert rules PRO | List, Create, Get, Update, Delete, Test |
| Mirrors PRO | List, Create, Get, Update, Delete, Test |
| Sessions PRO | List, End other sessions, End all of a user, End one |
| Archived events PRO | List, Get |
The admin app also calls routes that serve its own screens: its start-up payload, the settings, the Health report, the WP Activity Log import, the test notification, a user picker and, in Pro, the archive settings, file scans and the IP location database. They are left out of this reference because they change with the screens.
Even here, nothing edits an event. The deletes above remove a view, a rule, a schedule, a mirror or a sign-in session, never a log entry. Changes are recorded in the log itself: switching events (9000), switching a monitor (9002), downloading a CSV export (9003) and running a report (9006), among others. See Events.
Webhook events
Rather than polling, you can have events pushed to you PRO. An alert rule with a webhook channel posts the matching events to your https:// address as JSON:
{
"source": "plugixa-activity-log",
"site": "https://your-site.example/",
"rule": { "id": 3, "name": "Administrator sign-ins" },
"events": [
{
"occurred_at": "2026-11-12 09:30:00",
"event_code": 1000,
"severity": "informational",
"group": "Sign-ins",
"message": "alex signed in.",
"user": "alex",
"user_id": 1,
"ip": "203.0.113.9",
"object_type": "user",
"object_label": "alex",
"site_id": 1,
"url": "https://your-site.example/wp-admin/admin.php?page=plugixa-activity-log#/?event_code=1000&date_from=2026-11-12&date_to=2026-11-12"
}
]
}
When the channel has a signing secret, X-Plugixa-Signature carries sha256= followed by the HMAC-SHA256 of the raw body, keyed with the secret. occurred_at is UTC, and user is System when nobody was signed in. Deliveries time out after 5 seconds and do not follow redirects; any 2xx answer counts as delivered.
A mirror of type http sends every matching event as it happens, as { "source", "site", "events" }, with your token as Authorization: Bearer.
Errors
Errors use the standard WordPress shape:
{
"code": "plugixa_activity_log_forbidden",
"message": "You are not allowed to do that.",
"data": { "status": 403 }
}
These can come back from any endpoint. Each endpoint page lists its own errors on top of them.
| Status | Code | When |
|---|---|---|
401 |
plugixa_activity_log_forbidden |
Nobody is signed in: no credentials, or a cookie request without its nonce. |
403 |
plugixa_activity_log_forbidden |
The user is signed in but lacks the access level the route needs. |
401 |
rest_forbidden |
Nobody is signed in, on the session routes that need only a signed-in account PRO. WordPress answers these with its own code. |
401 |
incorrect_password, invalid_username |
WordPress refused the Application Password. |
404 |
rest_no_route |
No such route or method, a Pro route on the free build, or the module behind the route is switched off. |
400 |
rest_invalid_param |
A parameter failed validation, for example per_page above 200. |
A filter value the server does not understand is dropped, never an error. That is deliberate: a hand-edited or stale link then opens a wider view instead of failing. It also means a typo in a filter returns more than you expected, not nothing.
There is no rate limit.
Filtering what comes back
These filters change payloads in PHP without touching the routes:
| Filter | Changes |
|---|---|
plugixa_activity_log_event_item |
One event as sent, in a list or in full. Called once per row |
plugixa_activity_log_object_url |
The link to an event’s object in Get Event |
plugixa_activity_log_register_rest_routes fires when the plugin registers its routes, with the namespace and the plugin container: the place to add your own alongside them. See Hooks and the Developer reference.
Troubleshooting
| Symptom | Usual cause |
|---|---|
401, plugixa_activity_log_forbidden |
No credentials reached the site, or a cookie request without X-WP-Nonce. |
403, plugixa_activity_log_forbidden |
The account has no access to the log, or the route needs settings or export. |
| Application Passwords are not offered on the profile | The site is not on HTTPS. |
404, rest_no_route |
A Pro route on a free build, or its module is switched off under Monitors. |
400 on per_page |
It must be between 1 and 200. |
| A filter returned everything | Its value was not understood, and was dropped. |
total stops at 10,000 |
total_capped is true. The count is “10,000 or more”. |
| Times look wrong | Event times are UTC. date_from and date_to are read in the site’s time zone. |
| A site administrator sees fewer events than the network administrator | They are confined to their own site. |
See also
- The same data from a terminal: WP-CLI.
- React to events in PHP instead of polling: Hooks.
- What each event code means: Events.
- Have events pushed to you: Alert rules PRO and Mirrors PRO.
Quick Links
Share