You can get a list of all the quests of a campaign 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 | quests |
Default |
The list of returned entities can be filtered. The available filters are available here
{
"data": [
{
"id": 1,
"name": "Pelor's Quest",
"entry": "\n<p>Lorem Ipsum.</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"has_custom_image": false,
"is_private": true,
"entity_id": 164,
"tags": [],
"created_at": "2019-01-30T00:01:44.000000Z",
"created_by": 1,
"updated_at": "2019-08-29T13:48:54.000000Z",
"updated_by": 1,
"date": "2020-04-20",
"type": "Main",
"is_completed": false,
"quest_id": null,
"elements": []
}
]
}
To get the details of a single quest, use the following endpoint.
Method | URI | Headers |
---|---|---|
GET/HEAD | quests/{quest.id} |
Default |
{
"data": {
"id": 1,
"name": "Pelor's Quest",
"entry": "\n<p>Lorem Ipsum.</p>\n",
"image": "{path}",
"image_full": "{url}",
"image_thumb": "{url}",
"has_custom_image": false,
"is_private": true,
"instigator_id": null,
"location_id": null,
"entity_id": 164,
"tags": [],
"created_at": "2019-01-30T00:01:44.000000Z",
"created_by": 1,
"updated_at": "2019-08-29T13:48:54.000000Z",
"updated_by": 1,
"type": "Main",
"date": "2020-04-20",
"is_completed": false,
"quest_id": null,
"elements": []
}
}
To get the elements of a quest, use the following endpoint.
Method | URI | Headers |
---|---|---|
GET/HEAD | quests/{quest.id}/quest_elements |
Default |
{
"data": {
"entity_id": 33,
"name": null,
"created_at": "2019-01-30T00:01:44.000000Z",
"created_by": null,
"instigator_id": null,
"location_id": null,
"role": "Target",
"description": "Lorem Ipsum",
"description_parsed": "Lorem Ipsum",
"id": 2,
"visibility_id": 1,
"updated_at": "2019-08-29T13:48:54.000000Z",
"updated_by": null
}
}
{info} Adding (
POST
), Updating (PUT
,PATCH
) and Deleting (DELETE
) an element from a quest can also be done using the same patterns as for other endpoints.The
entity_id
orname
field has to be provided when creating a quest element.
To create a quest, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | quests |
Default |
Parameter | Type | Detail |
---|---|---|
name |
string (Required) |
Name of the quest |
entry |
string |
The html description of the quest |
type |
string |
Type of quest |
quest_id |
integer |
The parent quest |
instigator_id |
integer |
The quest's instigator (entity) |
location_id |
integer |
The quest's starting location (location) |
tags |
array |
Array of tag ids |
entity_image_uuid |
string |
Gallery image UUID for the entity image |
entity_header_uuid |
string |
Gallery image UUID for the entity header (limited to premium campaigns) |
is_private |
boolean |
If the quest is only visible to admin members of the campaign |
{success} Code 200 with JSON body of the new quest.
To update a quest, use the following endpoint.
Method | URI | Headers |
---|---|---|
PUT/PATCH | quests/{quest.id} |
Default |
The same body parameters are available as for when creating a quest.
{success} Code 200 with JSON body of the updated quest.
To delete a quest, use the following endpoint.
Method | URI | Headers |
---|---|---|
DELETE | quests/{quest.id} |
Default |
{success} Code 200 with JSON.