REST stands for Representational State Transfer.
It is a simple stateless architecture that generally runs over HTTP
The term API stands for Application Programming Interface. The term can be used to describe the features of a library, or how to interact with it.
HTTP methods
There are technically 8 different HTTP methods:
GET
POST
PUT
DELETE
OPTIONS
HEAD
TRACE
CONNECT
HTTP Status Codes
When you make an HTTP request, the server will respond with a code which corresponds to whether or not the request was successful and how the client should proceed. There are four different levels of codes:
- 2xx = Success
- 3xx = Redirect
- 4xx = User error
- 5xx = Server error
Here's a list of the most important status codes:
Success codes:
- 200 - OK (the default)
- 201 - Created
- 202 - Accepted (often used for delete requests)
User error codes:
- 400 - Bad Request (generic user error/bad data)
- 401 - Unauthorized (this area requires you to log in)
- 404 - Not Found (bad URL)
- 405 - Method Not Allowed (wrong HTTP method)
- 409 - Conflict (i.e. trying to create the same resource with a PUT request)