reading-notes

Reading notes about code for my future reference.

View the Project on GitHub

Reading Assignment 8

API Design Best Practices

What does REST stand for?

Representational State Transfer

REST APIs are designed around a ____.

RESOURCES!!! Things accessed by a client.

What is an identifier of a resource? Give an example.

Objects, data, and services.

What are the most common HTTP verbs?

GET, POST, PUT, PATCH, and DELETE

What should the URIs be based on?

URIs should based on Nouns and not verbs. In other words the actual resources themselves.

Give an example of a good URI. https://makeyourcodework.com/programs // Good

https://makeyourcodework.com/make-a-program // Bad

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

Having a chatty API means that the web API will expose a large number of smaller resources.

What status code does a successful GET request return?

200 (OK)

What status code does an unsuccessful GET request return?

404 (Not Found).

What status code does a successful POST request return?

200 (OK).

What status code does a successful DELETE request return?

204 (NO CONTENT).

Back to Home