Build a User Management API
Build a practical application using the hash and string data types.
Application overview
The solution is a server-side side application that exposes REST endpoints for managing users. You can interact with the application by executing these operations.
Use cases
The following use cases have been implemented in the application:
Create a user by sending an HTTP
POST
request: Adding a user involves two Redis operations. First, a user ID is generated usingIncr
, followed by the invocation ofHSet
to store user details in a hash. The autogenerated ID is used in the name of the hash in the formatuser:<user_id>
.Query a user with its ID by sending an HTTP
GET
request: Fetching user details involves executing theHGetAll
method. The hash containing the user data is in the formatuser:<user_id>
. The user ID being queried is extracted from the HTTP request and is used in the call toHGetAll
. If the user is present, the user data is returned as the HTTP response body.
Get hands-on with 1400+ tech skills courses.