reading-notes

Class 8 Notes

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.

Its a URI like https://adventure-works.com/orders/1

What are the most common HTTP verbs?

GET, POST, PUT, PATCH, and DELETE

What should the URIs be based on?

Heirachys

Give an example of a good URI.

https://adventure-works.com/collection/item

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

It means that you are requiring the application to go through a bunch of small resources to access a request. It creates more load for the web server to go through which in-turn increases the bandwith need for the request and slows the response down.

What status code does a successful GET request return?

HTTP status code 200 (OK).

What status code does an unsuccessful GET request return?

404 (Not Found).

What status code does a successful POST request return?

HTTP status code 201 (Created).

What status code does a successful DELETE request return?

HTTP status code 204 (No Content).

Things I want to know more about

I would like to learn more about different error codes and how to read these messages to understand what is going wrong.