Users

Endpoints for managing users

[ADMIN] Get all users

get

Retrieves a list of all users. Required admin role

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
get
/api/users

[ADMIN] Create user

post

Create user with provided data. Required admin role.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
musernamestring · min: 1Required

Username of the user

Example: john_doe
mpasswordstring · min: 1Required

Password of the user

Example: securepassword123
namestringOptional

Full name of the user

Example: John Doe
Responses
post
/api/users

[ADMIN] Link user to competition

post

Links a user to a competition. Required admin role.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

Request to link a user to a competition

userIdinteger · int64Required

ID of the user

Example: 1
competitionIdinteger · int64Required

ID of the competition

Example: 1001
Responses
post
/api/users/link

Change password

post

Changes the password for the current user. Requires current password verification.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
currentPasswordstringRequired
newPasswordstringRequired
Responses
post
/api/users/change-password

Get current user

get

Retrieves current user.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
get
/api/users/me

Last updated

Was this helpful?