Skip to main content
GET
/
api
/
management
/
users
/
{id}
Get User
curl --request GET \
  --url https://api.example.com/api/management/users/{id}
{
  "success": true,
  "timestamp": "<string>",
  "data": {
    "data.id": 123,
    "data.email": "<string>",
    "data.firstName": "<string>",
    "data.lastName": "<string>",
    "data.roles": [
      {}
    ]
  }
}

Endpoint

GET /api/management/users/{id}

Authentication

This endpoint requires authentication with a valid JWT token and the ADMIN role.
Authorization: Bearer <your_jwt_token>

Path Parameters

id
integer
required
The unique identifier of the user to retrieve

Response

Returns detailed information about the specified user.
success
boolean
required
Indicates if the request was successful
timestamp
string
required
ISO 8601 timestamp of the response
data
object
required
User details object
data.id
integer
required
Unique identifier for the user
data.email
string
required
User’s email address (unique in the system)
data.firstName
string
required
User’s first name
data.lastName
string
required
User’s last name
data.roles
array
required
Array of role strings assigned to the userAvailable roles:
  • MEMBER: Standard user role
  • ADMIN: Administrator role with full system access

Example Request

curl -X GET "http://localhost:8080/api/management/users/1" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Example Response

{
  "success": true,
  "timestamp": "2026-03-03T10:30:00Z",
  "data": {
    "id": 1,
    "email": "[email protected]",
    "firstName": "John",
    "lastName": "Doe",
    "roles": ["ADMIN", "MEMBER"]
  }
}

Error Responses

401 Unauthorized

Returned when authentication credentials are missing or invalid.
{
  "success": false,
  "timestamp": "2026-03-03T10:30:00Z",
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}

403 Forbidden

Returned when the authenticated user does not have the ADMIN role.
{
  "success": false,
  "timestamp": "2026-03-03T10:30:00Z",
  "error": {
    "code": "FORBIDDEN",
    "message": "Access denied. ADMIN role required."
  }
}

404 Not Found

Returned when no user exists with the specified ID.
{
  "success": false,
  "timestamp": "2026-03-03T10:30:00Z",
  "error": {
    "code": "USER_NOT_FOUND",
    "message": "User not found with id: 999"
  }
}

Build docs developers (and LLMs) love