What is an API?
API stands for Application Programming Interface. An API is an intermediary that allows two applications to interact with each other. It works like a messenger between two parties, where one party requests and receives a response from another party for the request.
Who is a Client?
A client is a software distributed to customers who can access or communicate with the server by using an API. This could be an internal service or an external facing asset like a mobile app (Android/iOS) or mobile website or website.
What is a Server?
A server is a machine running some processes that will process some service for you based on a user's request via API.
What are Status Codes?
Status codes are sent by a server in response to the request made by a client.
Response status codes are distributed into five categories -
- 1xx: Informational
- 2xx: Success
- 3xx: Redirection
- 4xx: Client Error
- 5xx: Server Error
1xx: Informational
| Status Code | Meaning |
|---|---|
| 100 | Continue |
| 102 | Switching Protocols |
| 103 | Processing |
2xx: Success
| 200 | Ok or Success |
| 201 | Created |
| 202 | Accepted |
| 203 | Non-Authoritative Information |
| 204 | No Content |
| 205 | Reset content |
| 206 | Partial Consent |
| 207 | Multi-Status |
| 208 | Already Reported |
| 226 | IM Used |
3xx: Redirection
| Status Code | Meaning |
|---|---|
| 300 | Multiple Choice |
| 301 | Moved Permanently |
| 302 | Found |
| 303 | See Other |
| 304 | Not Modified |
| 305 | User Proxy |
| 306 | Unused |
| 307 | Temporary Redirect |
| 308 | Permanent Redirect |
4xx: Client Error
| Status Code | Meaning |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Payment required |
| 403 | Forbidden |
| 404 | Not Found |
| 405 | Method Not Allowed |
| 406 | Not Acceptable |
| 407 | Proxy Authentication Required |
| 408 | Request Timeout |
| 409 | Conflict |
| 410 | Gone |
| 411 | Length Required |
| 412 | Precondition Failed |
| 413 | Payload Too Large |
| 414 | URI Too Long |
| 415 | Unsupported Media Type |
| 416 | Range Not Satisfiable |
| 417 | Expectation Failed |
| 418 | I'm a Teapot |
| 421 | Misdirect Request |
| 422 | Unprocessable Entity |
| 423 | Locked |
| 424 | Failed Dependency |
| 425 | Too Early |
| 426 | Upgrade Required |
| 428 | Precondition Required |
| 429 | Too Many Requests |
| 431 | Request Header Fields Too Large |
| 451 | Unavailable for Legal Reasons |
5xx: Server Error
| Status Code | Meaning |
|---|---|
| 500 | Internal Server Error |
| 501 | Not Implemented |
| 502 | Bad Gateway |
| 503 | Service Unavailable |
| 504 | Gateway Timeout |
| 505 | HTTP Version Not Supported |
| 511 | Network Authentication Required |