Contents
On this page

Trash Map - Plugixa Image Map

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

Move a map to the trash. It stops showing on the site and can be brought back with Restore Map.

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

Note. Trashing a map that is already in the trash answers 404, not 200. To delete a map for good, use Purge Map.

Request

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

Path parameters

Name Type Description
id integer The map’s id

Responses

200 OK. The map is in the trash.

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

Errors

Status Code When
404 plugixa_image_map_not_found No map with that id, the map is already in the trash, or code on your site refused the delete through the plugixa_image_map_can_delete 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" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-image-map/v1/maps/12');
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', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share