Skip to content

API Specification

Lilith edited this page Jul 3, 2023 · 34 revisions

End Points

WIP all contents of this page are subject to change.

Current API version: v1 (all current endpoints will of the form mac/<endpoint>/v1)

Do: Remeber best-practices when naming API endpoints.


user

Endpoint URL: mac/user/v1

GET

Payload:

{
  "steamID64": ["xyz", "abc"]
}

The payload shall consist of a list of steamID64 values

Response:

{
  "players": [
    "abc": {
     "gamename": "x",
     "accountDetails": [
      "name": "x",
      "pfp": "x",
      "steamID": {
        "steamID1": "x",
        "steamID3": "x",
        "steamID64": "abc"
      },
      "vacBans": "x",
      ...Any Other info you can find
     ],
     "team": "RED"
     "isClient": false,
     "gameData": {
       "kills": 0,
       "deaths": 0,
       ...
     },
     "verdict": "Suspicious",
    }
  ],
  "errors": {
    "xyz": "Player not found in game."
  },
}

The response shall contain a players object for each player that was both provided in the payload, and found in the game. And an errors object for each player that the back-end could not return a players object for

POST

Payload:

{
  "<steamID64>": {
    "verdict": "abc"
  } 
}

The payload shall contain a key-object pair where the key is the steamID64 of a desired user, and the object contains a single element, a key-value pair of "verdict": < verdict string >. This updates the back-end entry for the verdict of that player (defined by the steamID64).

Response:

{
  "errors": {}
}

The response shall contain an errors object that would detail any errors encountered whilst trying to update the specified players stored data.

Clone this wiki locally