The Dungeons of Kollchap from What Is Dungeons & Dragons? published 1982
RESTful Kollchap tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.
Verb | Usage |
---|---|
|
Used to retrieve a resource |
|
Used to create a new resource |
|
Used to update an existing resource, including partial updates |
|
Used to delete an existing resource |
RESTful characters tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.
Status code | Usage |
---|---|
|
The request completed successfully |
|
A new resource has been created successfully. The resource’s URI is available from the response’s
|
|
An update to an existing resource has been applied successfully |
|
The request was malformed. The response body will include an error providing further information |
|
The requested resource did not exist |
Every response has the following header(s):
Whenever an error response (status code >= 400) is returned, the body will contain a JSON object that describes the problem. The error object has the following structure:
For example, a request that attempts to apply a non-existent tag to a character will produce a
400 Bad Request
response:
RESTful Kollchap uses hypermedia and resources include links to other resources in their
responses. Responses are in Hypertext
Application Language (HAL) format. Links can be found beneath the _links
key. Users of
the API should not create URIs themselves, instead they should use the above-described
links to navigate from resource to resource.
The index provides the entry point into the service.
A GET
request is used to access the index
operation::index-example[snippets='response-fields,http-response,links']
The Characters resources is used to create and list characters
A GET
request will list all of the service’s characters.
operation::characters-list-example[snippets='response-fields,curl-request,http-response']
A POST
request is used to create a character.
operation::characters-create-example[snippets='request-fields,curl-request,http-response']
operation::characteristics-create-example[snippets='request-fields-characteristics']
The Character resource is used to retrieve, update, and delete individual characters
A GET
request will retrieve the details of a character
operation::character-get-example[snippets='response-fields,curl-request,http-response']
A PATCH
request is used to update a Character
operation::character-update-example[snippets='request-fields,curl-request,http-response']
The Rooms resources is used to create and list rooms
A GET
request will list all of the service’s rooms.
operation::rooms-list-example[snippets='response-fields,curl-request,http-response']
A POST
request is used to create a room.
operation::rooms-create-example[snippets='request-fields,curl-request,http-response']
The Room resource is used to retrieve, update, and delete individual rooms
A GET
request will retrieve the details of a room
operation::room-get-example[snippets='response-fields,curl-request,http-response']
A PATCH
request is used to update a Room
operation::room-update-example[snippets='request-fields,curl-request,http-response']
A GET
request will retrieve the details of a room
operation::room-keys-example[snippets='request-parameters,curl-request,http-response']