Users
Endpoints for managing users
Retrieves a list of all users. Required admin role
Authorizations
Responses
200
OK
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
409
Conflict
*/*
500
Internal Server Error
*/*
get
/api/usersGET /api/users HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"id": 1,
"username": "john_doe"
}
]Create user with provided data. Required admin role.
Authorizations
Body
musernamestring · min: 1RequiredExample:
Username of the user
john_doempasswordstring · min: 1RequiredExample:
Password of the user
securepassword123namestringOptionalExample:
Full name of the user
John DoeResponses
200
OK
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
409
Conflict
*/*
500
Internal Server Error
*/*
post
/api/usersPOST /api/users HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 74
{
"musername": "john_doe",
"mpassword": "securepassword123",
"name": "John Doe"
}{
"id": 1,
"username": "john_doe"
}Links a user to a competition. Required admin role.
Authorizations
Body
Request to link a user to a competition
userIdinteger · int64RequiredExample:
ID of the user
1competitionIdinteger · int64RequiredExample:
ID of the competition
1001Responses
200
OK
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
409
Conflict
*/*
500
Internal Server Error
*/*
post
/api/users/linkPOST /api/users/link HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 33
{
"userId": 1,
"competitionId": 1001
}{
"status": "OK"
}Changes the password for the current user. Requires current password verification.
Authorizations
Body
currentPasswordstringRequired
newPasswordstringRequired
Responses
200
OK
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
409
Conflict
*/*
500
Internal Server Error
*/*
post
/api/users/change-passwordPOST /api/users/change-password HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 47
{
"currentPassword": "text",
"newPassword": "text"
}{
"status": "OK"
}Retrieves current user.
Authorizations
Responses
200
OK
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
409
Conflict
*/*
500
Internal Server Error
*/*
get
/api/users/meGET /api/users/me HTTP/1.1
Host: localhost:8080
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"musername": "text",
"mpassword": "text",
"name": "text",
"roles": [
"USER"
],
"id": 1,
"createdAt": "2025-10-28T12:43:31.640Z",
"updatedAt": "2025-10-28T12:43:31.640Z",
"authorities": [
{
"authority": "text"
}
],
"isAdmin": true,
"username": "text",
"password": "text",
"enabled": true,
"credentialsNonExpired": true,
"accountNonExpired": true,
"accountNonLocked": true
}Was this helpful?