APIs
API Design Best Practices
- What does REST stand for?
Representational State Transfer
- REST APIs are designed around a __.
It is designed around Platform independence and Service evolution.
- What is an identifier of a resource? Give an example.
It is a URL that ‘unlocks’ the resource data.
- What are the most common HTTP verbs?
GET
, POST
, PUT
, PATCH
, and DELETE
.
- 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.
- Give an example of a good URI.
https://getpokemon.com/pokemons/original151/25
- 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.
- What status code does a successful
GET
request return?
200
- What status code does an unsuccessful
GET
request return?
404
- What status code does a successful
POST
request return?
201
- What status code does a successful
DELETE
request return?
204
Things I want to know more about