Contents
On this page

Cancel Job - Plugixa Permalink Manager

POST /plugixa-permalink-manager/v1/jobs/{id}/cancel

Stop a queued or running job. What it already changed stays changed.

Needs the plugixa_permalink_manager_tools capability, or plugixa_permalink_manager_import_export when the job is an import.

A job that has already stopped is returned as it is.

Request

POST https://your-site.example/wp-json/plugixa-permalink-manager/v1/jobs/58/cancel

Path parameters

Name Type Description
id integer The job id

Responses

200 OK. data is the job.

{
  "success": true,
  "data": {
    "id": 58,
    "type": "regenerate",
    "status": "cancelled",
    "dry_run": false,
    "params": {
      "kind": "post",
      "type": "product",
      "mode": "default",
      "include_manual": false
    },
    "total": 18,
    "processed": 8,
    "changed": 2,
    "skipped": 1,
    "failed": 0,
    "samples": [
      {
        "status": "changed",
        "after": "shop/tents/trailhead-3",
        "kind": "post",
        "id": 41,
        "title": "Trailhead 3 Tent",
        "before": "product/trailhead-3"
      }
    ],
    "undoable": false,
    "last_error": null,
    "created_at": "2026-11-12 09:30:00",
    "finished_at": "2026-11-12 09:30:02"
  }
}
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
404 plugixa_permalink_manager_not_found No job with that id.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-permalink-manager/v1/jobs/58/cancel" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-permalink-manager/v1/jobs/58/cancel');
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/cancel', {
  method: 'POST',
  headers: { 'Authorization': auth },
});
const { data } = await response.json();

Quick Links

Share