Quests


All Quests

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 api/1.0/campaigns/{campaign.id}/.

Method Endpoint Headers
GET/HEAD quests Default

Results

{
    "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": []
        }
    ]
}

Filters

The list of returned quests can be filtered. The available filters are available here: API filters.

Quest

To get the details of a single quest, use the following endpoint.

Method Endpoint Headers
GET/HEAD quests/{quest.id} Default

Results

{
    "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,
        "type": "Main",
        "date": "2020-04-20",
        "is_completed": false,
        "quest_id": null,
        "elements": []
    }

}

Quest Elements

To get the elements of a quest, use the following endpoint.

Method Endpoint Headers
GET/HEAD quests/{quest.id}/quest_elements Default

Results

{
    "data": {
        "entity_id": 33,
        "created_at":  "2019-01-30T00:01:44.000000Z",
        "created_by": null,
        "role": "Target",
        "description": "Lorem Ipsum",
        "description_parsed": "Lorem Ipsum",
        "id": 2,
        "visibility": "all",
        "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.

Create a Quest

To create a quest, use the following endpoint.

Method Endpoint Headers
POST quests Default

Body

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
character_id integer The quest's character (quest giver)
tags array Array of tag ids
is_private boolean If the quest is only visible to admin members of the campaign
image_url string URL to a picture to be used for the quest

Results

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

Update a Quest

To update a quest, use the following endpoint.

Method Endpoint Headers
PUT/PATCH quests/{quest.id} Default

Body

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

Results

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

Delete a Quest

To delete a quest, use the following endpoint.

Method Endpoint Headers
DELETE quests/{quest.id} Default

Results

{success} Code 200 with JSON.