Contents
On this page

Purge Map - Plugixa Image Map

DELETE /plugixa-image-map/v1/maps/{id}/purge

Delete a map permanently, with its saved versions and autosaves. There is no way back.

Any signed-in user with the plugixa_image_map_delete capability. Administrators have every Plugixa Image Map capability; see Roles and permissions.

Note. The map does not have to be in the trash first: a live map is deleted just the same. Its statistics PRO are not deleted with it. Shortcodes and blocks that show it stop rendering it.

Request

DELETE https://your-site.example/wp-json/plugixa-image-map/v1/maps/12/purge

Path parameters

Name Type Description
id integer The map’s id

Responses

200 OK. The map is gone.

{
  "success": true,
  "data": {
    "purged": true
  }
}

Errors

Status Code When
404 plugixa_image_map_not_found No map with that id, or code on your site refused the delete through the plugixa_image_map_can_purge filter.

Plus the errors every endpoint can return.

Examples

curl -s -X DELETE "https://your-site.example/wp-json/plugixa-image-map/v1/maps/12/purge" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-image-map/v1/maps/12/purge');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-image-map/v1/maps/12/purge', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share