A sample CRUD using Spring Rest API to manage users
Since it was designed for testing purposes the API is public by default. You can protect the API with spring profiles:
Edit default username and password in the application-basic.properties file and run the application as follows:
cd rest-users-api
mvn clean spring-boot:run -spring.profiles.active=basic
- GET /users --> List all users
- GET /users/id --> Get information from given user
- POST /users --> Create new user
- PUT /users/id --> Update all data for given user id
- PATCH /users/id --> Update sent data for given user id
- POST /authenticate --> Authenticate user
- id: autonumeric
- username: String
- firstName: String
- lastName: String
- email: String
API documented with Swagger. You can access to the UI on http://localhost:8080/swagger-ui.html