What does REST stand for?
Representational State Transfer
REST APIs are designed around a ____.
Resource
What is an identifier of a resource? Give an example.
An identifier would be a URI which is unique to that resource.
https://resource-identifier/49nf7
What are the most common HTTP verbs?
GETPOSTPUTPATCHDELETEWhat should the URIs be based on?
URIs should be based on nouns, representing the resource, and not verbs, representing actions to take with or on the resource.
Give an example of a good URI.
https://awesome-website/form GOOD
https://awesome-website/submit-form BAD
What does it mean to have a ‘chatty’ web API? Is this a good or a bad thing?
It means having an API that requires a large number of requests which each return a small resource and might require multiple requests in order to get the resource(s) required. While it can reduce the size of resources sent to a client, it may increase the number of requests needed to get a resource which could slow things down or use even more bandwidth. Finding the right balance is dependent on the application and data.
What status code does a successful GET request return?
200 (Ok)
What status code does an unsuccessful GET request return?
400
What status code does a successful POST request return?
201 (Created)
What status code does a successful DELETE request return?
204 (No Content)