Contents
On this page

Image Map Pro Sources - Plugixa Image Map

GET /plugixa-image-map/v1/import/image-map-pro/sources

List the maps the Image Map Pro plugin has stored on this site, so one can be imported by its id.

Any signed-in user with both plugixa_image_map_import and plugixa_image_map_create. See Roles and permissions.

Request

GET https://your-site.example/wp-json/plugixa-image-map/v1/import/image-map-pro/sources

Responses

200 OK. data is the list of maps, sorted by name.

{
  "success": true,
  "data": [
    {
      "id": "5f0c2a9e-7d1b-4e63-a8c4-1b2e3d4f5a6b",
      "name": "Office floors",
      "artboards": 2,
      "objects": 37
    },
    {
      "id": "a1d3c5e7-9b2f-4d6a-8c0e-2f4a6c8e0b1d",
      "name": "Store locator",
      "artboards": 1,
      "objects": 120
    }
  ]
}
Field Type Meaning
data[].id string The Image Map Pro map id, to send as source_id to Import Image Map Pro Map
data[].name string Its name
data[].artboards integer Number of artboards. Each becomes its own map
data[].objects integer Number of shapes, those inside groups included

At most 500. An empty list when Image Map Pro’s data is not on this site. Image Map Pro itself does not have to be active.

Errors

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-image-map/v1/import/image-map-pro/sources" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-image-map/v1/import/image-map-pro/sources');
curl_setopt_array($ch, [
    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/import/image-map-pro/sources', {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share