reading-notes

Read: Class 08 - Readings: APIs

Reading

API Design Best Practices

  1. What does REST stand for?
    • Representational State Transfer
  2. REST APIs are designed around a __.
    • resource
  3. What is an identifier of a resource? Give an example.
    • resources have an identifier, which is a URI that uniquely identifies that resource
    • https://adventure-works.com/orders/1
  4. What are the most common HTTP verbs?
    • GET, POST, PUT, PATCH, DELETE
  5. What should the URIs be based on?
    • unique identification and meaningful descriptions
  6. Give an example of a good URI.
    • https://axéallday.com/bookings/teambuilding/let-us-play
  7. What does it mean to have a ‘chatty’ web API? Is this a good or a bad thing?
    • a ‘chatty” API is a bad thing because it exposes the server to a large number of small resources
  8. What status code does a successful GET request return?
    • 200 (OK)
  9. What status code does an unsuccessful GET request return?
    • 404 (Not Found)
  10. What status code does a successful POST request return?
    • 201 (Created)
  11. What status code does a successful DELETE request return?
    • 204 (No Content)