Lab 7 - Part 1
Lab 7 - Part 1
Lab 7 - Part 1
Lab 7 – Part 1
Objective
Create a Restful Web API with PHP
Due Date
See Brightspace posting for the due date of this lab. To earn 5 points, you are required:
2. Submit your lab work to the Brightspace before the due date.
3. Demo your lab work during the following week’s lab sessions.
Requirements
1. Create a new folder WebServices inside AMPPS’ www folder. Add a .htaccess file
to define the necessary URL rewrite rules to forward restaurant view Web API’s
URLs to their corresponding URL to RestaurantReview.php.
Get All Restaurant Reviews – Accept a HTTP GET request without review’s ID,
return a json string of a list of Restaurant objects containing the restaurant
review data in your restaurant_review.xml file.
Get Restaurant Review by Id – Accept a HTTP GET request with a review’s ID,
returns a json string of a Restaurant objects containing the restaurant review data.
Get Restaurant Names – Accept a HTTP GET request for all names of the
restaurants in the restaurant_review.xml file, returns an array of restaurant names.
string. For simplicity, the new restaurant review write to the xml file will only
contain the data in the RestaurantInfo object,
3. User Postman, or any Restful Web API Test client of your choice, to test Post, Put,
and Delete methods of RestaurantServiceAPI.