Map Groups


All Map-groups

You can get a list of all the map-groups of a map by using the following endpoint.

{warning} Don't forget that all endpoints documented here need to be prefixed with 1.0/campaigns/{campaign.id}/.

Method URI Headers
GET/HEAD maps/{map.id}/map_groups Default

Results

{
    "data": [
        {
            "created_at": "2020-07-25T16:24:34.000000Z",
            "created_by": 1,
            "id": 3,
            "is_private": false,
            "is_shown": true,
            "map_id": 1,
            "name": "Spoon",
            "position": 1,
            "updated_at": "2020-07-25T16:24:34.000000Z",
            "updated_by": null,
            "visibility_id": 1
        }
    ]
}

Create a Map Group

To create a map group, use the following endpoint.

Method URI Headers
POST maps/{map.id}/map-groups Default

Body

Parameter Type Detail
name string (Required without entity_id) Name of the map group
map_id int (Required) The parent map
is_shown boolean If the layer is shown on map load
position int Position in the list of groups
visibility_id integer The visibility: 1 for all, 2 self, 3 admin, 4 self-admin or 5 members.

Results

{success} Code 200 with JSON body of the new map.

Update a Map

To update a map, use the following endpoint.

Method URI Headers
PUT/PATCH maps/{map.id}/map-groups/{map.id} Default

Body

The same body parameters are available as for when creating a map.

Results

{success} Code 200 with JSON body of the updated map.

Delete a Map

To delete a map, use the following endpoint.

Method URI Headers
DELETE maps/{map.id}/map-groups/{map.id} Default

Results

{success} Code 200 with JSON.