Demon listing

GET /demons/

Pagination:
This endpoint supports pagination and filtering via query parameters. Please see the documentation on pagination for information on the additional request and response fields headers.

Allows to retrieve a potentionally filtered version of the demonlist.

Filtering:

The result can be filtered by any of the following fields: name, position, requirement. To filter by verifier, publisher or creator, please use GET /players/player_id/ and inspect the relevant fields of the Player object.

Pagination is done via the position field.

Request:

No request data required

Response: 200 OK

Header Value
Content-Type application/json
Field Type Description
- List[Demon] A list of demons

Example request:

GET /api/v1/demons/
     Accept: application/json

Adding demons

POST /demons/

Access Restrictions:
Access to this endpoint requires at least LIST_MODERATOR permissions.

Adds a demon to the demonlist. Adding a demon automatically shifts the other demons around to make room for the newly added one.

The video value, if provided, must meet the requirements specified here.

Request:

Header Expected Value Optional
Content-Type application/json or multipart/form-data false
Field Type Description Optional
name string The name of the demon false
position integer The position of the demon false
requirement integer The record requirement for the demon false
verifier string The name of the verifier of the demon false
publisher string The name of the publisher of the demon false
creators List[string] The names of the creatorsof the demon false
notes string Additional notes for the demon true
video string A link to the verification video true

Response: 201 CREATED

Header Value
Content-Type application/json
Location The location of the newly created demon
ETag base64 encoded hash of the newly created demon
Field Type Description
data Demon The newly created demon object

Errors:

Status code Error code Description
409 40904 A demon with the specified name already exists on the list
422 42212 The requirement value is either smaller than 0 or greater than 100
422 42213 The position value is either smaller than 1 or greater than current amount of demons on the list

Example request:

POST /api/v1/demons/
     Accept: application/json
     Authorization: Bearer <omitted>
     Content-Type: application/json
     
     {
         "name": "Cadrega City",
         "position": 11,
         "requirement": 54,
         "verifier": "Sunix",
         "publisher": "Pennutoh",
         "creators": ["Pennutoh"],
         "video": "https://www.youtube.com/watch?v=cHEGAqOgddA"
     }

Demon retrieval

GET /demons/ position /

Retrieves detailed information about the demon at position

Request:

Header Expected Value Optional
If-Match Conditional request header. If the etag value of the requested data matches any of the here provided values, the data is returned as requested. Otherwise a 412 PRECONDITION FAILED response is generated true
If-None-Match Conditional request header. If the etag value of the requested data does not match any of the here provided values, if it returned as requested. Otherwise, a 304 NOT MODIFED response is generated true

Response: 200 OK

Header Value
Content-Type application/json
ETag base64 encoded hash of the demon object
Field Type Description
data Demon The requested demon object

Response: 304 NOT MODIFIED

Returned if the If-None-Match header is set, and the etag for the demon object matches one of the set values.

Header Value
ETag base64 encoded hash of the demon object

Errors:

Status code Error code Description
404 40401 No demon at the specified position

Example request:

GET /api/v1/demons/1/
     Accept: application/json

Modifying a demon

PATCH /records/ record_id /

Access Restrictions:
Access to this endpoint requires at least LIST_MODERATOR permissions.

Modifies a given demon.

Note that updating the position of a demon will automatically shift around the other demons to ensure position consitency.

The video value, if provided, must meet the requirements specified here.

Request:

Header Expected Value Optional
Content-Type application/merge-patch+json false
Authorization Pointercrate access token false
If-Match Conditional request header. Needs to be set to the current etag value of the demon object false
Field Type Description Optional
name string Set to update the name of the demon true
position integer Set to update the position of the demon true
video string Set to update the verification video true
requirement integer Set to update the record requirement true
verifier string Set to update the verifier. Needs to be the name of the player true
publisher string Set to update the publisher. Needs to be the name of the player true
notes string Set to update the notes true

Response: 200 OK

Header Value
Content-Type application/json
ETag base64 encoded hash of the updated demon
Field Type Description
data Demon The updated demon object

Response: 304 NOT MODIFIED

Returned when the PATCH operation did not make any changes.

Header Value
ETag base64 encoded hash of the demon

Errors:

Status code Error code Description
404 40401 No demon at the specified position
409 40904 A demon with the updated name already exists on the list
422 42212 The requirement value is smaller than 0 or greater than 100
422 42213 The position value is either smaller than 1 or greater than current amount of demons on the list

Example request:

PATCH /api/v1/demons/1/
     Accept: application/json
     Authorization: Bearer <omitted>
     Content-Type: application/merge-patch+json
     If-Match: cPOrB3TM19Ffsm8PAkD2jNqB61A=
     
     {
         "notes": "This demon was hack-verified",
         "position": 17,
         "requirement": 45
     }

Adding creators

POST /demons/ position /creators/

Access Restrictions:
Access to this endpoint requires at least LIST_MODERATOR permissions.

Adds a creator the creator list of the demon at the specified position.

Request:

Header Expected Value Optional
Authorization Pointercrate access token false
Content-Type application/json or multipart/form-data false
Field Type Description Optional
creator string The creator to add. Needs to be the player's name false

Response: 204 NO CONTENT

Nothing

Errors:

Status code Error code Description
404 40401 No demon at the specified position
409 40905 The given player is already registered as a creator

Example request:

POST /api/v1/demons/2/creators/
     Accept: application/json
     Authorization: Bearer <omitted>
     Content-Type: application/json
     
     {
         "creator": "ViPriN"
     }

Removing creators

POST /demons/ position /creators/ player_id /

Access Restrictions:
Access to this endpoint requires at least LIST_MODERATOR permissions.

Removes the specified player from the creator list of the demon at the specified position.

Request:

Header Expected Value Optional
Authorization Pointercrate access token false

Response: 204 NO CONTENT

Nothing

Errors:

Status code Error code Description
404 40401 No demon at the specified position
404 40401 No player with the specified player_id
409 40906 The given player is not registered as a creator

Example request:

DELETE /api/v1/demons/2/creators/1/
     Accept: application/json
     Authorization: Bearer <omitted>