List all demons

GET /v2/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.

Retrieves a, potentially filtered, list of every demon in the pointercrate database, sorted by id.

Filtering:

The result can be filtered by any of the following fields: name, name_contains, requirement, verifier.id (via verifier_id), publisher.id (via publisher_id), verifier.name (via verifier_name), publisher.name (via publisher.name). To filter by creator, please use GET /players/player_id/ and inspect the relevant fields of the Player object.

Pagination is done via the id 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/v2/demons/
Accept: application/json

List ranked demons

GET /v2/demons/listed/

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.

Retrieves a, potentially filtered, list of only the demons currently placed on the demonslist, sorted by position. The Demon objects returned here will never have their position field be null.

Filtering:

The result can be filtered by any of the following fields: name, name_contains, requirement, verifier.id (via verifier_id), publisher.id (via publisher_id), verifier.name (via verifier_name), publisher.name (via publisher.name). To filter by 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/v2/demons/listed/
Accept: application/json

Adding demons

POST /api/v2/demons/

Rate Limits:
This endpoint is ratelimited at 1 request per minute

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 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
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 unsigned 64 bit 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/v2/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 /v2/demons/ id /

Retrieves detailed information about the demon with the given id

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 unsigned 64 bit 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 unsigned 64 bit hash of the demon object

Errors:

Status code Error code Description
404 40401 No demon with the specified id

Example request:

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

Modifying a demon

PATCH /v2/demons/ 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 consistency.

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

Request:

Header Expected Value Optional
Content-Type application/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
thumbnail string Set to update the thumbnail 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

Response: 200 OK

Header Value
Content-Type application/json
ETag unsigned 64 bit 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 unsigned 64 bit hash of the demon

Errors:

Status code Error code Description
404 40401 No demon with the specified id
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/v2/demons/1/
Accept: application/json
Authorization: Bearer <omitted>
Content-Type: application/json
If-Match: cPOrB3TM19Ffsm8PAkD2jNqB61A=

{
    "position": 17,
    "requirement": 45
}

Adding creators

POST /v2/demons/ id /creators/

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

Adds a creator the creator list of the demon with the specified id

Request:

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

Response: 201 CREATED

Nothing

Errors:

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

Example request:

POST /api/v2/demons/2/creators/
Accept: application/json
Authorization: Bearer <omitted>
Content-Type: application/json

{
    "creator": "ViPriN"
}

Removing creators

DELETE /v2/demons/ demon_id /creators/ player_id /

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

Removes the specified player from the creator list of the demon with the specified demon_id.

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 with the specified demon_id
404 40401 No player with the specified player_id
409 40906 The given player is not registered as a creator

Example request:

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