Contents
On this page

Update Report Schedule - Plugixa Activity Log

PUT /plugixa-activity-log/v1/reports/schedules/{id}

Change a scheduled report. PATCH does exactly the same.

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

Note. The body is merged over the stored schedule one field at a time: a field you leave out keeps its value. A field you do send replaces the stored one whole, so filters, sections and recipients are not merged item by item: sending "filters": {"group": "users"} removes a stored min_severity.

Note. Every save works out next_run_at again from the current time, even when you change only the name.

Request

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

Path parameters

Name Type Description
id integer The schedule’s id

Request body

Content type: application/json

The same fields as Create Report Schedule, all optional: name, recipients, frequency, weekday, monthday, hour, format, sections, filters, enabled. The result must still pass the same checks, so a schedule always keeps a name, at least one section and 1 to 20 recipients. Switching a schedule off sets next_run_at to null; switching it on again schedules the next run.

{
  "frequency": "monthly",
  "monthday": 1,
  "recipients": ["owner@example.com", "security@example.com"]
}

Responses

200 OK. data is the updated schedule.

{
  "success": true,
  "data": {
    "id": 3,
    "name": "Weekly security summary",
    "enabled": true,
    "frequency": "monthly",
    "weekday": 1,
    "monthday": 1,
    "hour": 7,
    "format": "html",
    "sections": ["summary", "by_severity", "events"],
    "filters": { "min_severity": "high" },
    "recipients": ["owner@example.com", "security@example.com"],
    "site_id": 0,
    "last_run_at": "2026-11-09 07:00:04",
    "last_status": "sent",
    "last_error": "",
    "next_run_at": "2026-12-01 07:00:00",
    "created_by": 1,
    "created_at": "2026-10-20 14:02:11",
    "modified_at": "2026-11-12 10:15:00"
  }
}
Field Type Meaning
data.next_run_at string|null UTC datetime of the next run, worked out again by this save
data.modified_at string UTC datetime of this change

The other fields are described on List Report Schedules.

Errors

Status Code When
404 plugixa_activity_log_not_found No schedule with that id, or, on multisite, one that belongs to another site.
422 plugixa_activity_log_invalid_schedule A field is not acceptable. data.field names the field.

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-activity-log/v1/reports/schedules/3" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"frequency":"monthly","monthday":1,"recipients":["owner@example.com","security@example.com"]}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-activity-log/v1/reports/schedules/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([
        'frequency'  => 'monthly',
        'monthday'   => 1,
        'recipients' => ['owner@example.com', 'security@example.com'],
    ]),
]);
$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/reports/schedules/3', {
  method: 'PUT',
  headers: {
    'Authorization': `Basic ${auth}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    frequency: 'monthly',
    monthday: 1,
    recipients: ['owner@example.com', 'security@example.com'],
  }),
});
const { data } = await response.json();

Quick Links

Share