You can get a list of all the map-layers 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_layers |
Default |
{
"data": [
{
"created_at": "2020-07-03T14:12:45.000000Z",
"created_by": 1,
"height": 1080,
"id": 2,
"is_private": false,
"map_id": 1,
"name": "Prague",
"position": 0,
"type": "standard",
"type_id": false,
"updated_at": "2020-07-03T14:12:45.000000Z",
"updated_by": null,
"visibility_id": 1,
"width": 1920
}
]
}
To create a map layer, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | maps/{map.id}/map-layers |
Default |
Parameter | Type | Detail |
---|---|---|
name |
string (Required without entity_id ) |
Name of the map layer |
map_id |
int (Required) |
The parent map |
image_url |
string (Required without image ) |
URL to a picture to be used for the map |
entry |
string |
Entry of the layer |
type_id |
int |
null and 0 for standard , 1 for overlay , 2 for overlay_shown |
position |
int |
Position in the list of layers |
visibility_id |
integer |
The visibility: 1 for all , 2 self , 3 admin , 4 self-admin or 5 members . |
{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-layers/{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-layers/{map.id} |
Default |
{success} Code 200 with JSON.