reading-notes

APIs

API Design Best Practices

  1. What does REST stand for?
    Representational State Transfer
  2. REST APIs are designed around a __.
    It is designed around Platform independence and Service evolution.
  3. What is an identifier of a resource? Give an example.
    It is a URL that ‘unlocks’ the resource data.
  4. What are the most common HTTP verbs?
    GET, POST, PUT, PATCH, and DELETE.
  5. What should the URIs be based on?
    You should name them with logical names, they are used to group data sets as well as target specific data points.
  6. Give an example of a good URI.
    https://getpokemon.com/pokemons/original151/25
  7. What does it mean to have a ‘chatty’ web API? Is this a good or a bad thing?
    A ‘chatty’ web API is a bad thing because it means a lot of small data packages are sent to the client. It is best to group data before sending.
  8. What status code does a successful GET request return?
    200
  9. What status code does an unsuccessful GET request return?
    404
  10. What status code does a successful POST request return?
    201
  11. What status code does a successful DELETE request return?
    204

Things I want to know more about