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
api/1.0/campaigns/{campaign.id}/
.
Method | URI | Headers |
---|---|---|
GET/HEAD | maps/{map.id}/map_groups |
Default |
{
"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": "all"
}
]
}
To create a map group, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | maps/{map.id}/map-groups |
Default |
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 |
string |
all , admin , admin-self or self |
{success} Code 200 with JSON body of the new map.
To update a map, use the following endpoint.
Method | URI | Headers |
---|---|---|
PUT/PATCH | maps/{map.id}/map-groups/{map.id} |
Default |
The same body parameters are available as for when creating a map.
{success} Code 200 with JSON body of the updated map.
To delete a map, use the following endpoint.
Method | URI | Headers |
---|---|---|
DELETE | maps/{map.id}/map-groups/{map.id} |
Default |
{success} Code 200 with JSON.