Contents
Restore Map - Plugixa Image Map
POST /plugixa-image-map/v1/maps/{id}/restore
Take a trashed map out of the trash. It comes back with the status it had.
Any signed-in user with the plugixa_image_map_delete capability. Administrators have every Plugixa Image Map capability; see Roles and permissions.
Note. Restoring a map that is not in the trash answers
404with the message “That map does not exist.”, even though it does.
Request
POST https://your-site.example/wp-json/plugixa-image-map/v1/maps/12/restore
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The map’s id |
Responses
200 OK. The map is out of the trash.
{
"success": true,
"data": {
"restored": true
}
}
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_image_map_not_found |
No map with that id, or the map is not in the trash. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-image-map/v1/maps/12/restore" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-image-map/v1/maps/12/restore');
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 response = await fetch('https://your-site.example/wp-json/plugixa-image-map/v1/maps/12/restore', {
method: 'POST',
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
},
});
const { data } = await response.json();
Quick Links
Share