We need commands to manage the backend, so for now, these will be implemented via the authentication system.
These are internal, so regular users shouldn't be using these. All endpoints are assumed to use the /internal/* path. Additionally, any of these endpoints MAY change at any time, and API is not 100% guaranteed.
POST Create User (Auth)
/user/create
{
"username": "tiny_pineapple",
"roles": [
"abcde"
]
}
PATCH Modify User (Auth)
/user/modify/{user_id}
POST Create User Role (Auth)
/role/create
PUT Update User Role (Auth)
Any fields provided will override existing values.
Response
We need commands to manage the backend, so for now, these will be implemented via the authentication system.
These are internal, so regular users shouldn't be using these. All endpoints are assumed to use the
/internal/*path. Additionally, any of these endpoints MAY change at any time, and API is not 100% guaranteed./event/{event_slug}/create- Creates an event.display_name,discord_role_id,minecraft_version, mod loaderloader,registration_time,start_time, andend_timewithin anapplication/jsonbody./event/{event}/modify- Modifies an event's properties.application/jsonbody./db/eval- Evaluates an SQL expression and returns the result.expressionwithin anapplication/jsonbody.POST Create User (Auth)
/user/create{ "username": "tiny_pineapple", "roles": [ "abcde" ] }PATCH Modify User (Auth)
/user/modify/{user_id}{ // TODO: Move username and bio modifications to public facing API at some point. "username": "tiny_pineapple", // Must be rejected on the same conditions as it would within user creation. "bio": { // All fields can be set to null to remove the value. // Avatars are considered a separate endpoint because the CDN must be interacted with for those. "display_name": "Tiny Pineapple", "pronouns": "it/its", "description": "Wanted in 32 gardens.", "fields": { "Crimes Committed": "Too Many To Count", "Head Count": "5", "Morality": null } }, "roles": [ "abcde", "!fghij" // ! in front of a role ID marks it for removal. ] }POST Create User Role (Auth)
/role/create{ "name": "Pineapple", "permissions": "1", // The user cannot add permissions they do not have, the server MUST refuse this request "integrations": { "discord": { "role_id": "1234567890", // Discord Role ID "permissions": "1" // Discord permissions } } }PUT Update User Role (Auth)
Any fields provided will override existing values.
Response
{ "name": "Pineapple", "permissions": "1", // The user cannot add permissions they do not have, the server MUST refuse this request "integrations": { "discord": { "role_id": "1234567890", // Discord Role ID "permissions": "1" // Discord permissions } } }