Player listing

GET /players/

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.

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

Allows to retrieve a potentially filtered list of all players having records on the list, or are associated with a demon in some other way.

Filtering:

The result can be filtered by any of the following fields: id, name, banned.

Pagination is done via the id field.

Request:

Header Expected Value Optional
Authorization Pointercrate access token false

Response: 200 OK

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

Example request:

GET /api/v1/players/
     Accept: application/json
     Authorization: Bearer <omitted>

Player retrieval.

GET /players/ player_id /

Retrieves detailed information about the player with id player_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 base64 encoded hash of the player object
Field Type Description
data Player The requested player object

Response: 304 NOT MODIFIED

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

Header Value
ETag base64 encoded hash of the player object

Errors:

Status code Error code Description
404 40401 No player with id player_id was found

Example request:

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

Modifying a player

PATCH /players/ player_id /

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

Modifies a given player.

Banning a player will hide, but not delete their records from the list. After he has been unbanned, they can be readded.

Renaming a player to the name of an already existing player will merge all their records. If the two players have a record on the same demon, the record will the higher progress will take precedence.

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 player object false
Field Type Description Optional
name string Set to update the player's name true
banned boolean Set to update the player's banned status true

Response: 200 OK

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

Response: 304 NOT MODIFIED

Returned when the PATCH operation did not make any changes.

Header Value
ETag base64 encoded hash of the player

Errors:

Status code Error code Description
400 40003 Invalid data type for requested field
403 40302 The requested field cannot be updated via this endpoint
404 40401 No player with id player_id was found

Example request:

PATCH /api/v1/players/1/
     Accept: application/json
     Authorization: Bearer <omitted>
     Content-Type: application/merge-patch+json
     If-Match: FfbtbML27VL1ciOI1Ar0mX20Yhc=
     
     {
         "banned": true
     }

Deleting a player

DELETE /players/ player_id /

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

Deletes a player. This only works if the player is no longer referenced by any records or demons.

Request:

Header Expected Value Optional
Authorization Pointercrate access token false
If-Match Conditional request header. Needs to be set to the current etag value of the player object false

Response: 204 NO CONTENT

Nothing

Errors:

Status code Error code Description
404 40401 No player with id player_id was found
409 40901 The player is still referenced somewhere and cannot be deleted
412 41200 The value provided in the If-Match header doesn't match the current state of the object
418 41800 No If-Match header was provided

Example request:

DELETE /api/v1/players/1/
     Accept: application/json
     Authorization: Bearer <omitted>
     If-Match: FfbtbML27VL1ciOI1Ar0mX20Yhc=