Users
Endpoints for managing users
Retrieves a list of all users. Required admin role
OK
Unique identifier of the user
1Username of the user
john_doeUnauthorized
Forbidden
Conflict
Internal Server Error
GET /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.
Username of the user
john_doePassword of the user
securepassword123Full name of the user
John DoeOK
Unique identifier of the user
1Username of the user
john_doeUnauthorized
Forbidden
Conflict
Internal Server Error
POST /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.
Request to link a user to a competition
ID of the user
1ID of the competition
1001OK
Response indicating success
Status of the response
OKUnauthorized
Forbidden
Conflict
Internal Server Error
POST /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.
OK
Response indicating success
Status of the response
OKUnauthorized
Forbidden
Conflict
Internal Server Error
POST /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.
OK
Unauthorized
Forbidden
Conflict
Internal Server Error
GET /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": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z",
"authorities": [
{
"authority": "text"
}
],
"isAdmin": true,
"username": "text",
"password": "text",
"enabled": true,
"credentialsNonExpired": true,
"accountNonExpired": true,
"accountNonLocked": true
}Last updated
Was this helpful?