Contents
On this page

Export Roles - Plugixa Advanced User Role Editor

GET /plugixa-aure/v1/transfer/export

Every role, or the ones you name, as an export file you can import on another site.

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

GET https://your-site.example/wp-json/plugixa-aure/v1/transfer/export?roles=support_agent

Query parameters

Name Type Default Description
roles string Comma-separated role slugs. Empty exports every role.

Responses

200 OK. data holds the file.

{
  "success": true,
  "data": {
    "filename": "roles-your-site.example-2026-11-12.json",
    "bundle": {
      "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"
    }
  }
}
Field Type Meaning
data.filename string A suggested file name
data.bundle.format string Always plugixa-aure/roles
data.bundle.version integer Format version, 1
data.bundle.meta object generated (UTC datetime), site, plugin and wordpress versions, and the number of roles
data.bundle.roles object Role slug to name and capabilities (capability to true or false)
data.bundle.checksum string SHA-256 of the roles, which lets an import tell whether the file was edited

Save bundle as JSON to get the file the Export screen downloads. Send that text back as file to Inspect Import and Import Roles.

Errors

Status Code When
404 plugixa_aure_unknown_role The role does not exist.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-aure/v1/transfer/export?roles=support_agent" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query([
    'roles' => 'support_agent',
]);
$ch = curl_init('https://your-site.example/wp-json/plugixa-aure/v1/transfer/export?' . $query);
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 query = new URLSearchParams({ roles: 'support_agent' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-aure/v1/transfer/export?${query}`, {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share