Base URL
The User Management API is accessible at:localhost:8080 with your deployed API domain.
Getting Started
The User Management API provides RESTful endpoints for managing user records in your application. All endpoints accept and return JSON data.Quick Start
- Register a new user using
POST /api/v1/users - Retrieve users using
GET /api/v1/usersorGET /api/v1/users/{id} - Update user details using
PUT /api/v1/users/{id} - Delete a user using
DELETE /api/v1/users/{id}
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/users | Register a new user |
| GET | /api/v1/users | Get all users |
| GET | /api/v1/users/{id} | Get user by ID |
| PUT | /api/v1/users/{id} | Update user |
| DELETE | /api/v1/users/{id} | Delete user |
Authentication
Currently, this API does not require authentication. If you’re deploying to production, consider implementing Spring Security for endpoint protection.Content Type
All requests that send data must include theContent-Type: application/json header.
All responses return Content-Type: application/json.
Common Error Responses
The API uses RFC 7807 Problem Details format for error responses.400 Bad Request
Returned when request validation fails (missing required fields, invalid format, etc.).404 Not Found
Returned when a requested user doesn’t exist.409 Conflict
Returned when attempting to create a user that already exists.500 Internal Server Error
Returned when an unexpected error occurs.User Roles
The API supports three user roles:ADMIN- Administrative accessUSER- Standard user accessGUEST- Guest access