Please note that you are required to use Java as the language and ideally, Spring Boot as the framework.
Managing users’ accesses to new features via feature switches, i.e. enabling/disabling certain feature based on a user’s email and feature names.
GET /feature?email=XXX&featureName=XXX
This endpoint receivesemail
(user's email) andfeatureName
as request parameters and return the following response in JSON format.
Example Response:
{
"canAccess": true|false (will be true if the user has access to the featureName)
}
POST /feature
This endpoint receives the following request in JSON format and returns an empty response with HTTP Status OK (200) when the database is updated successfully, otherwise returns Http Status Not Modified (304).
Example Request:
{
"feature": "xxx", (string)
"email": "xxx", (string)
"enable": true|false (boolean) (uses true to enable a user's access, otherwise false)
}