Overview
The Users API provides endpoints for managing user accounts in the Library Management System. It includes both user self-service endpoints and administrative endpoints for managing all users.Base URLs
User Self-Service:Authentication
All user management endpoints require authentication via JWT token. The token must be included in theAuthorization header:
Role-Based Access Control
User endpoints implement role-based access control:- User Self-Service (
/api/users/*): Available to all authenticated users- Users can view and edit their own profile
- Users can view public profiles of other users
- Administrative (
/api/management/users/*): Requires ADMIN role- Full access to all user management operations (list, create, read, update, delete)
403 Forbidden response.
Available Roles
The system supports two user roles:MEMBER: Standard user with basic accessADMIN: Administrator with full system access
Response Format
All endpoints return responses wrapped in a standardApiResponse object:
User Self-Service Endpoints
Get My Profile
View your own profile with email and roles
Edit My Profile
Update your first and last name
Get Public Profile
View another user’s public profile
Administrative Endpoints
List Users
Retrieve a paginated list of all users (ADMIN)
Get User
Retrieve details of a specific user by ID (ADMIN)
Create User
Create a new user account (ADMIN)
Update User
Update an existing user’s information (ADMIN)
Delete User
Delete a user from the system (ADMIN)