Skip to the content.

Home Page

Class 08 Notes

API Design Best Practices

  1. REST stands for Representational State Transfer.

  2. REST APIs are designed around resources. This can be objects, data or services.

  3. A resource identifier is a unique URL to this resource.

  4. The most common HTTP verbs are GET, POST, PUT, PATCH, and DELETE.

  5. URLs should be based on,

  6. https://adventure-works.com/orders is an example of a good URL.

  7. Having a ‘chatty’ API means that it takes more than one call to get the information you requested from that API. It is best to avoid having a chatty API.

  8. A successful GET returns the code 200 OK.

  9. An unsuccessful GET returns 404 ‘not found’.

  10. A successful POST returns code 201.

  11. A successful DELETE returns code 204.

Things I want to know more about