You can get a list of all the locations of a campaign 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 | locations |
Default |
The list of returned locations can be filtered. The available filters are available here: API filters.
{
"data": [
{
"id": 1,
"name": "Mordor",
"entry": "\n<p>Lorem Ipsum.</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"has_custom_image": false,
"is_private": true,
"location_id": null,
"entity_id": 5,
"tags": [],
"created_at": "2019-01-30T00:01:44.000000Z",
"created_by": 1,
"updated_at": "2019-08-29T13:48:54.000000Z",
"updated_by": 1,
"parent_location_id": 4,
"map": "{url}",
"is_map_private": 0,
"type": "Kingdom"
}
]
}
To get the details of a single location, use the following endpoint.
Method | URI | Headers |
---|---|---|
GET/HEAD | locations/{location.id} |
Default |
{
"data": {
"id": 1,
"name": "Mordor",
"entry": "\n<p>Lorem Ipsum.</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"has_custom_image": false,
"is_private": true,
"location_id": null,
"entity_id": 5,
"tags": [],
"created_at": "2019-01-30T00:01:44.000000Z",
"created_by": 1,
"updated_at": "2019-08-29T13:48:54.000000Z",
"updated_by": 1,
"parent_location_id": 4,
"map": "{url}",
"is_map_private": 0,
"type": "Kingdom"
}
}
To get the map points of a location, use the following endpoint.
Method | URI | Headers |
---|---|---|
GET/HEAD | locations/{location.id}/map_points |
Default |
{
"data": {
"target_entity_id": 58,
"axis_x": 1356,
"axis_y": 788,
"colour": "red",
"size": "small",
"icon": "skull",
"shape": "circle",
"name": null,
"created_at": "2019-01-30T00:01:44.000000Z",
"updated_at": "2019-08-29T13:48:54.000000Z"
}
}
{info} Additional note:
target_entity_id
represents anentities
.id
.
To create a map point on a location, use the following endpoint. This feature is deprecated and usage of the maps entity is recommended.
Method | URI | Headers |
---|---|---|
POST | locations/{location.id}/map_points |
Default |
Parameter | Type | Detail |
---|---|---|
location_id |
integer |
The location id (where this map point is located) |
target_entity_id |
string (Required, unless name is specified) |
Target Entity's entity_id |
name |
string (Required, unless target_entity_id is specified) |
Name of the map point |
location_id |
integer |
Location the entity note was written at |
axis_x |
integer (Required) |
X Axis of the Map Point |
axis_y |
integer (Required) |
Y Axis of the Map Point |
colour |
string (Required) |
none , grey , red , blue , green , yellow , black or white |
shape |
string (Required) |
circle or square |
size |
string (Required) |
standard , small or large |
icon |
string (Required) |
pin , entity or many options. |
{info} Adding (
POST
), Updating (PUT
,PATCH
) and Deleting (DELETE
) a map point from a location can also be done using the same patterns as for other endpoints.
To create a location, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | locations |
Default |
Parameter | Type | Detail |
---|---|---|
name |
string (Required) |
Name of the location |
entry |
string |
The html description of the location |
type |
string |
Type of location |
parent_location_id |
integer |
The parent location id (where this location is located) |
tags |
array |
Array of tag ids |
is_private |
boolean |
If the location is only visible to admin members of the campaign |
image_url |
string |
URL to a picture to be used for the location |
entity_image_uuid |
string |
Gallery image UUID for the entity image (limited to superboosted campaigns) |
entity_header_uuid |
string |
Gallery image UUID for the entity header (limited to superboosted campaigns) |
{success} Code 200 with JSON body of the new location.
To update a location, use the following endpoint.
Method | URI | Headers |
---|---|---|
PUT/PATCH | locations/{location.id} |
Default |
The same body parameters are available as for when creating a location.
{success} Code 200 with JSON body of the updated location.
To delete a location, use the following endpoint.
Method | URI | Headers |
---|---|---|
DELETE | locations/{location.id} |
Default |
{success} Code 200 with JSON.