Contents
On this page

Get Event - Plugixa Activity Log

GET /plugixa-activity-log/v1/events/{id}

One event in full: everything a list row carries, plus its recorded details, a link to the object when it still exists, and its definition from today’s catalogue.

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

Request

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

Path parameters

Name Type Description
id integer The event’s id

Responses

200 OK. data is the event.

{
  "success": true,
  "data": {
    "id": 48230,
    "occurred_at": "2026-11-12T09:20:41Z",
    "event_code": 2001,
    "severity": "low",
    "group": "content",
    "group_label": "Posts and pages",
    "site_id": 1,
    "user": { "id": 1, "login": "alex", "name": "Alex Martin", "exists": true },
    "user_role": "administrator",
    "ip": "203.0.113.9",
    "object": {
      "type": "post",
      "id": 512,
      "label": "Autumn opening hours",
      "url": "https://your-site.example/wp-admin/post.php?post=512&action=edit"
    },
    "action": "published",
    "message": "Post “Autumn opening hours” was published.",
    "context": {
      "object_id": 512,
      "object_label": "Autumn opening hours",
      "post_type": "post",
      "type": "Post",
      "post_status": "publish",
      "old_status": "draft",
      "new_status": "publish",
      "source": "web",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
    },
    "definition": {
      "subgroup": "Life cycle",
      "template": "{type} “{object}” was published."
    }
  }
}
Field Type Meaning
data.context object The details recorded with the event. Its keys depend on the kind of event. source says where the request came from: web, ajax, rest, cron or cli. A context too large to keep is stored as {"_truncated": true}
data.object.url string The edit screen of the post, media item, user or comment, when it still exists on this site and the caller may edit it. Empty otherwise
data.definition object|null What this kind of event is, from today’s catalogue: null if the code is no longer known
data.definition.subgroup string The event’s sub-group
data.definition.template string The message template, with {placeholders}

Every other field is as in List Events.

Errors

Status Code When
404 plugixa_activity_log_not_found No event with that id, or, for a site administrator on multisite, an event on another site.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share