Contents
On this page

Inspect Import - Plugixa Advanced User Role Editor

POST /plugixa-aure/v1/transfer/inspect

Read an export file and report, role by role, what importing it would change and whether you are allowed to. Nothing is saved.

Needs the Edit roles permission: plugixa_aure_edit_roles. Part of the Export and import feature: when it is switched off in Settings the route is not registered and answers 404.

Request

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

Request body

Content type: application/json

Field Type Required Description
file string Yes The file’s contents as text: a JSON string inside the JSON body, not an upload. At most 1 MB. Accepted: this plugin’s exports, Members JSON exports and User Role Editor CSV exports.
{
  "file": "{\"format\":\"plugixa-aure/roles\",\"version\":1,\"meta\":{\"generated\":\"2026-11-12 09:30:00\",\"site\":\"https://your-site.example\",\"plugin\":\"1.0.0\",\"wordpress\":\"6.8.3\",\"roles\":1},\"roles\":{\"support_agent\":{\"name\":\"Support agent\",\"capabilities\":{\"edit_posts\":true,\"moderate_comments\":true,\"read\":true,\"upload_files\":false}}},\"checksum\":\"7c1d9a5e0b3f48a26e9d1c07b4a8f53e2d6c90b1a7e4f3d28c5b6a09e1f7d4c2\"}"
}

Responses

200 OK. data is the report.

{
  "success": true,
  "data": {
    "meta": {
      "generated": "2026-11-12 09:30:00",
      "site": "https://your-site.example",
      "plugin": "1.0.0",
      "wordpress": "6.8.3",
      "roles": 1
    },
    "source": "plugixa-aure/roles",
    "intact": true,
    "plan": [
      {
        "slug": "support_agent",
        "name": "Support agent",
        "exists": false,
        "identical": false,
        "suggested": "add",
        "change": {
          "granted": [
            "edit_posts",
            "moderate_comments",
            "read"
          ],
          "revoked": [],
          "denied": [
            "upload_files"
          ],
          "cleared": []
        },
        "warnings": [],
        "blockers": [],
        "allowed": true
      }
    ],
    "blocked": 0,
    "identical": 0
  }
}
Field Type Meaning
data.meta object The file’s own meta, or imported_from for a foreign file
data.source string plugixa-aure/roles, members or ure_csv
data.intact boolean For this plugin’s files, whether the checksum matches: false means it was edited after export. Always true for foreign files
data.plan[] array One row per role, sorted by slug
data.plan[].exists boolean Whether the role already exists here
data.plan[].identical boolean It exists with the same name and capabilities
data.plan[].suggested string add for a new role, skip for an existing one
data.plan[].change object The four change lists against the role as it is here
data.plan[].warnings array Risky grants: cap, severity, explain, confirm
data.plan[].blockers array Capabilities you may not grant: cap, code, message
data.blocked integer Roles that could not be imported as they are
data.identical integer Roles that are already identical

Errors

Status Code When
413 plugixa_aure_file_too_large file is over 1 MB.
422 plugixa_aure_file_empty file is empty.
422 plugixa_aure_bad_bundle file is not in a format the plugin reads.
422 plugixa_aure_empty_bundle file contains no usable role.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-aure/v1/transfer/inspect" \
  -u "admin:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"file":"{\"format\":\"plugixa-aure/roles\",\"version\":1,\"meta\":{\"generated\":\"2026-11-12 09:30:00\",\"site\":\"https://your-site.example\",\"plugin\":\"1.0.0\",\"wordpress\":\"6.8.3\",\"roles\":1},\"roles\":{\"support_agent\":{\"name\":\"Support agent\",\"capabilities\":{\"edit_posts\":true,\"moderate_comments\":true,\"read\":true,\"upload_files\":false}}},\"checksum\":\"7c1d9a5e0b3f48a26e9d1c07b4a8f53e2d6c90b1a7e4f3d28c5b6a09e1f7d4c2\"}"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-aure/v1/transfer/inspect');
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([
        'file' => '{"format":"plugixa-aure/roles","version":1,"meta":{"generated":"2026-11-12 09:30:00","site":"https://your-site.example","plugin":"1.0.0","wordpress":"6.8.3","roles":1},"roles":{"support_agent":{"name":"Support agent","capabilities":{"edit_posts":true,"moderate_comments":true,"read":true,"upload_files":false}}},"checksum":"7c1d9a5e0b3f48a26e9d1c07b4a8f53e2d6c90b1a7e4f3d28c5b6a09e1f7d4c2"}',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-aure/v1/transfer/inspect', {
  method: 'POST',
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ file: '{"format":"plugixa-aure/roles","version":1,"meta":{"generated":"2026-11-12 09:30:00","site":"https://your-site.example","plugin":"1.0.0","wordpress":"6.8.3","roles":1},"roles":{"support_agent":{"name":"Support agent","capabilities":{"edit_posts":true,"moderate_comments":true,"read":true,"upload_files":false}}},"checksum":"7c1d9a5e0b3f48a26e9d1c07b4a8f53e2d6c90b1a7e4f3d28c5b6a09e1f7d4c2"}' }),
});
const { data } = await response.json();

Quick Links

Share