COMP3220 REST Coursework 2019-2020
COMP3220 REST Coursework 2019-2020
Deadline: 4pm Wed 11th December 2019 Feedback: Wed 8th January 2020
Instructions
This coursework is to be completed individually.
Part 1
Your first task is to browse and document the University Facilities and Equipment API. You have one starting
URI and should use what you have learned about HTTP and REST to explore the API and make note of what
you find. Your colleagues recommend that you use an HTTP tool like Postman, RESTClient or cURL to do this.
The following questions will help guide your exploration; you should include answers to them in your
documentation:
• What methods can you use on each URI?
• What format can URIs take?
• What other URIs are possible for this service?
You must:
1. Add your choice of a new piece of equipment to a facility of your choice using the University Facilities and
Equipment API so that it appears in the list. Pick a piece of equipment that does not already exist.
2. Write an HTML5 page to document how the API works. You should describe each resource endpoint in the
API that you find. You must have one page for the whole API, ordered and split into sections as appropriate. It
is expected that the documentation for each resource will include:
a. The URI template for the resource.
b. Any parameters, including what type of values they take.
c. Which HTTP methods can be used on the resource.
d. Example representations for the resource.
e. Example inputs for each interaction that modifies the resource.
Part 2
Your boss now wants you to design an extension to the API which enables students and staff to book facilities
and equipment, and which enables administrators to manage the facilities and equipment. The system
should handle:
• Booking of facilities and equipment
• Cancellations
• Reporting of misuse and broken equipment
You may include any additional support in your design for the needs of students and staff, as you see
fit. This might include and is not limited to: allowing staff to override a student’s booking; or appealing
penalties of reported misuse.
You must:
1. Plan each of the steps that go into the booking process. Define URIs to identify the required
additional resources and the methods that interact with them to perform the process and move
through the states.
2. Draw a state diagram that shows a user’s (both staff and students) interactions with the API. (like
the one in Figure 4.1 of REST in Practice).
3. Provide structured documentation of all your new API endpoints using OpenAPI and Swagger.
When documenting your extension using OpenAPI, make sure that you document:
a. The URI templates;
b. The parameters in the URI templates (what they mean, and what types of values they take);
c. The HTTP methods that can be used on the resources;
d. The representation formats (inputs and outputs) for each type of resource.
2
Submission
You will be expected to submit the following:
For Part 1:
• Evidence of submitting a new piece of equipment (screenshots or a text log of request and response).
• A single .html file and an accompanying .css stylesheet, documenting the API in the existing system.
For Part 2:
• A state diagram (format up to you, expecting .png, .jpg, .pptx or .pdf)
• OpenAPI documentation, detailing your designed extensions to the API to add the ability to book
facilities and equipment.
Please submit your coursework using the ECS electronic hand-in system (http://handin.ecs.soton.ac.uk/) by
4pm on the due date.
Marking Scheme
Criterion Description Outcomes Total