reading-notes

API best practices

  1. What does REST stand for? REST APIs are designed around a __. Rest APIs are designed around recources and REST stands for Representational state transfer

  2. What is an identifer of a resource? Give an example. A identifier is a URI that uniquely indentifies that resource. http://amazon.com/orders/1

  3. What are the most common HTTP verbs?

GET, POST, PUT, PATCH, AND DELETE.

  1. What should the URIs be based on? they should be based on nouns not verbs

  2. Give an example of a good URI. https://adventure-works.com/orders

  3. What does it mean to have a ‘chatty’ web API? Is this a good or a bad thing?

it is a bad thing because you shouldn’t expose small recourses

  1. What status code does a successful GET request return? a representation of the resource at the specified URI or status code 201

  2. What status code does an unsuccessful GET request return? 404 not found

  3. hat status code does a successful POST request return? 201

  4. What status code does a successful DELETE request return?204