Skip to content

API Entities

Michael Bryant edited this page May 15, 2020 · 1 revision

This page details the structure of the possible objects returned by a given request.

Status

Every response will have an outer object containing the requested resource(s) on success or an error message on failure. They contain a type field because that is what our JSON serialization library is set up to do, but the HTTP status code is a better indication of what kind of status occurred.

Error

{
    "type": "error",
    "message": "Some error message that can be displayed to the user."
}

Success

The data field may be an object or an array, depending on how many resources were requested. See API General for more on how responses to specific kinds of requests will look, regardless of the specific resource requested.

{
    "type": "success",
    "data": {}
}

Entities

Most, if not all, entities have "full" and "summary" versions. "Summary" versions show up in collections of the type and in entities containing one or more instances of them. For instance, requesting a list of all spells will return summary versions of them, as will requesting a character (and thus their collection of spells).

Clone this wiki locally