Contents
On this page

Update Mirror - Plugixa Activity Log

PUT /plugixa-activity-log/v1/mirrors/{id}

Change a mirror. PATCH does exactly the same.

Needs settings access (see who can call what). Needs Plugixa Activity Log Pro, with the Mirrors module on under Plugixa Activity Log -> Monitors.

Note. A top-level field you leave out keeps its stored value, but config and filters are replaced whole when you send them: a key missing from the config you send goes back to its default (a syslog port to 514, transport to udp), and an http config sent without its token, or with an empty one, clears the token. Send the masked token from Get Mirror back unchanged to keep it. type cannot be changed: a value sent for it is ignored.

Request

PUT https://your-site.example/wp-json/plugixa-activity-log/v1/mirrors/3

Path parameters

Name Type Description
id integer The mirror’s id

Request body

Content type: application/json

Field Type Required Description
name string No Must not be blank when sent.
enabled boolean No Only true, 1, "1" and "true" count as on.
config object No Replaces the stored config. Fields as on Create Mirror. A file mirror keeps its key whatever you send.
filters object No Replaces the stored filters: min_severity and groups.

The stored config is checked again on every change, so a mirror whose destination is no longer allowed cannot be saved until it is fixed. The change is recorded in the log as event 9501.

{
  "config": { "url": "https://siem.example.com/ingest/v2", "token": "••••9f2c" },
  "filters": { "min_severity": "medium", "groups": [] }
}

Responses

200 OK. data is the updated mirror.

{
  "success": true,
  "data": {
    "id": 3,
    "name": "SIEM collector",
    "type": "http",
    "enabled": true,
    "config": { "url": "https://siem.example.com/ingest/v2", "token": "••••9f2c", "has_token": true },
    "filters": { "min_severity": "medium", "groups": [] },
    "created_by": 1,
    "created_at": "2026-11-12 09:40:00",
    "modified_at": "2026-11-12 10:15:00"
  }
}
Field Type Meaning
data.config object The config as stored
data.config.has_token boolean http only: check it after a change to be sure the token was kept
data.filters object The filters as stored
data.modified_at string UTC datetime of this change

Errors

Status Code When
404 plugixa_activity_log_not_found No mirror with that id.
422 plugixa_activity_log_invalid name is blank, a syslog host is missing, or port is out of range.
422 plugixa_activity_log_unsafe_destination The URL is not valid or not https://, the host name is not valid, or it points at this machine or a private network.

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-activity-log/v1/mirrors/3" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"config":{"url":"https://siem.example.com/ingest/v2","token":"••••9f2c"},"filters":{"min_severity":"medium","groups":[]}}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-activity-log/v1/mirrors/3');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'config'  => ['url' => 'https://siem.example.com/ingest/v2', 'token' => '••••9f2c'],
        'filters' => ['min_severity' => 'medium', 'groups' => []],
    ]),
]);
$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/mirrors/3', {
  method: 'PUT',
  headers: {
    'Authorization': `Basic ${auth}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    config: { url: 'https://siem.example.com/ingest/v2', token: '••••9f2c' },
    filters: { min_severity: 'medium', groups: [] },
  }),
});
const { data } = await response.json();

Quick Links

Share