Contents
Undo Job - Plugixa Permalink Manager
POST /plugixa-permalink-manager/v1/jobs/{id}/undo
Start a new job that puts back every address a finished run changed, newest change first. Tick it like any other job.
Needs the plugixa_permalink_manager_tools capability, or plugixa_permalink_manager_import_export when the job is an import.
Only a run whose undoable is true can be undone: finished, not a preview, not itself an undo, and with changes. The undo is an ordinary change: it is recorded, the address it undoes keeps redirecting, and an address somebody took in the meantime is reported as failed rather than taken back. The undo job runs for real at once, without a preview.
Request
POST https://your-site.example/wp-json/plugixa-permalink-manager/v1/jobs/58/undo
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The job to undo |
Responses
201 Created. data is the undo job.
{
"success": true,
"data": {
"id": 61,
"type": "undo",
"status": "queued",
"dry_run": false,
"params": {
"job_id": 58,
"entries": [
{
"history_id": 905,
"kind": "post",
"id": 41,
"old_uri": "product/trailhead-3",
"new_uri": "shop/tents/trailhead-3",
"old_mode": 0,
"old_source": "auto"
}
]
},
"total": 1,
"processed": 0,
"changed": 0,
"skipped": 0,
"failed": 0,
"samples": [],
"undoable": false,
"last_error": null,
"created_at": "2026-11-12 09:30:00",
"finished_at": null
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
The job id: tick it with Tick Job |
data.type |
string |
What the job does |
data.status |
string |
queued, running, done, failed or cancelled |
data.dry_run |
boolean |
true for a preview that changes nothing |
data.params |
object |
The parameters as the job will use them, after cleaning |
data.total |
integer |
Items the job expects to go through, counted when it was created |
data.processed |
integer |
Items gone through so far |
data.changed |
integer |
Items changed, or that a preview would change |
data.skipped |
integer |
Items left alone |
data.failed |
integer |
Items that could not be changed |
data.samples |
array |
Up to 500 changed or failed items: status, kind, id, title, before, after and message |
data.undoable |
boolean |
Whether Undo Job will accept it |
data.last_error |
string|null |
Why a failed job stopped |
data.created_at |
string |
UTC datetime |
data.finished_at |
string|null |
UTC datetime, once it has stopped |
Errors
| Status | Code | When |
|---|---|---|
422 |
plugixa_permalink_manager_invalid |
The job does not exist, cannot be undone, or has already been undone. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-permalink-manager/v1/jobs/58/undo" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-permalink-manager/v1/jobs/58/undo');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const response = await fetch('https://your-site.example/wp-json/plugixa-permalink-manager/v1/jobs/58/undo', {
method: 'POST',
headers: { 'Authorization': auth },
});
const { data } = await response.json();
Quick Links
Share