Contents
On this page

Create Snapshot - Plugixa Advanced User Role Editor

POST /plugixa-aure/v1/snapshots

Take a restore point now, with an optional label. Manual points are not pruned.

Needs the Edit roles permission: plugixa_aure_edit_roles.

Request

POST https://your-site.example/wp-json/plugixa-aure/v1/snapshots

Request body

Content type: application/json

Field Type Required Description
label string No A label for the point. Markup is stripped.

POST /history does the same and answers with {"snapshot": <id>} only.

{
  "label": "Before the shop launch"
}

Responses

200 OK. The point was taken.

{
  "success": true,
  "data": {
    "id": 43,
    "snapshots": [
      {
        "id": 43,
        "createdAt": "2026-11-12 09:30:00",
        "actorId": 1,
        "kind": "manual",
        "label": "Before the shop launch",
        "operation": "snapshot.manual",
        "target": "",
        "size": 18120,
        "actor": "Sam Carter"
      },
      {
        "id": 42,
        "createdAt": "2026-11-12 09:30:00",
        "actorId": 1,
        "kind": "auto",
        "label": "",
        "operation": "changes.apply",
        "target": "role:editor,user:12",
        "size": 18342,
        "actor": "Sam Carter"
      }
    ]
  }
}
Field Type Meaning
data.id integer The new point’s id
data.snapshots array The 50 most recent points, as in List Snapshots

Errors

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-aure/v1/snapshots" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"label":"Before the shop launch"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-aure/v1/snapshots');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'label' => 'Before the shop launch',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-aure/v1/snapshots', {
  method: 'POST',
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ label: 'Before the shop launch' }),
});
const { data } = await response.json();

Quick Links

Share