Produce a REST API application that maintains a phone book of names and phone numbers. The program shall be capable of receiving and storing a list of people with their full name and telephone.
Need help with this assignment?Get an original answer from a qualified tutor — from $10/page.
Get it written →Produce a REST API application that maintains a phone book of names and phone numbers. The program shall be capable of receiving and storing a list of people with their full name and telephone.
The application shall include the following API endpoints:
GET /PhoneBook/list – Produce a list of the members of the database.
POST /PhoneBook/add – Add a new person to the database.
Argument is an object with name and phone number string elements.
PUT /PhoneBook/deleteByName – Remove someone from the database by name.
Argument is the name as a string.
PUT /PhoneBook/deleteByNumber – Remove someone by telephone #.
Argument is the phone number as a string.
See the PhoneBook.json file attached to the assignment in Canvas for a full OpenAPI 3.0 spec to be used as requirements for the interface. Return values should all be in JSON. Create regular expressions for <Person> and <Telephone #>. Use these regular expressions to verify that the user is supplying valid data. More flexible specifications will be graded higher. For example:
Allowing for international or US format telephone numbers
Allowing for <first middle last>, <first last> or <last, first MI>)
Reject any attempts to provide invalid data. When valid input is provided, the server shall return a status code of 200; when invalid input is provided, the server shall return a status code of 400 and an appropriate error message included in the response. An attempt to remove a non-existent name from the directory shall return a status code of 404.
The full instructions are in the attached pdf. The phonebook code will be provided, all you have to do is the REST API calls and description of how the code works.
Get a plagiarism-free answer to this question
Send us your instructions and we’ll match you with the best writer in your subject.
- 100% human-written, zero AI
- Turnitin report included
- Confidential — we never share your data
- Free revisions & refunds