dimanche 6 septembre 2020

Design REST API User Management - SAP 2020 OA

These are 2 questions I found on the internet for the SAP SVNT test- Can you please help me how to answer these questions

Question 1:

Build a User Management Functionality for a web application

You must be able to cover the below functionality

  1. Create a new user on Signup with a unique user id which will be the primary key. This user-id should not be their email or any other personal details.
  2. Delete a specific user.
  3. Update the email-id of the user.
  4. Get information of a specific user using their unique user id.
  5. Get all the users living in San Francisco.
  6. Update the password of a specific user using their unique user id.
  7. Get all users that have logged in at least once since this week.

Note: A user would have the following details:

  • First name
  • Last name
  • Email id
  • Phone number
  • Location

a) Write API endpoints for each of the following functionalities in the given blanks. You are free to use your own naming conventions

For example: GET .../api name?[parametersj

b) What mechanisms would you put in place to prevent a denial-of-service attack?

Question 2:

In the first week of your job, you are asked to build a distributed system to execute jobs in a priority sequence. Each job has a unique identifier. You must be able to:

  1. Insert a job, according to its associated priority.
  2. Delete a job, based on its identifier.
  3. Return the identifier of the highest-priority job waiting to run.
  4. Return a list of all jobs in the queue, ordered from top priority to least priority.
  5. Return the number of jobs that are waiting in the queue.

a) Write the RESTful API endpoint definition of the above functionality. For example: GET .../api name?[parameters]

b) How would you ensure data consistency in your system?

Thank you for your help




Aucun commentaire:

Enregistrer un commentaire