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
GET /api/users HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
Accept: */*
[
{
"id": 1,
"username": "john_doe"
}
]
Create user with provided data. Required admin role.
Authorizations
Body
musernamestring · min: 1RequiredExample:
Username of the user
john_doe
mpasswordstring · min: 1RequiredExample:
Password of the user
securepassword123
namestringOptionalExample:
Full name of the user
John Doe
Responses
200
OK
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
409
Conflict
*/*
500
Internal Server Error
*/*
post
POST /api/users HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
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
1
competitionIdinteger · int64RequiredExample:
ID of the competition
1001
Responses
200
OK
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
409
Conflict
*/*
500
Internal Server Error
*/*
post
POST /api/users/link HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
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
POST /api/users/change-password HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
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
GET /api/users/me HTTP/1.1
Host: localhost:8080
Authorization: Bearer JWT
Accept: */*
{
"musername": "text",
"mpassword": "text",
"name": "text",
"roles": [
"USER"
],
"id": 1,
"createdAt": "2025-06-30T18:44:48.126Z",
"updatedAt": "2025-06-30T18:44:48.126Z",
"authorities": [
{
"authority": "text"
}
],
"isAdmin": true,
"username": "text",
"password": "text",
"enabled": true,
"credentialsNonExpired": true,
"accountNonExpired": true,
"accountNonLocked": true
}
Was this helpful?