What Is A REST API
- Redhat
https://www.redhat.com/en/topics/api/what-is-a-rest-api
- IBM Cloud
https://www.youtube.com/watch?v=lsMQRaeKNDk
- NordicAPI
https://nordicapis.com/all-you-need-to-know-about-rest-api-design/
An API is a set of definitions and protocols for building and integrating application software. It’s sometimes referred to as a contract between an information provider and an information user—establishing the content required from the consumer (the call) and the content required by the producer (the response).
In other words, if you want to interact with a computer or system to retrieve information or perform a function, an API helps you communicate what you want to that system so it can understand and fulfill the request.
You can think of an API as a mediator between the users or clients and the resources or web services they want to get. It’s also a way for an organization to share resources and information while maintaining security, control, and authentication—determining who gets access to what.
REpresentational State Transfer
A rest api endpoint can be:
HTTP methods for REST api:
A request typically consists of
When a client request is made via a RESTful API, it transfers a representation of the state of the resource to the requester or endpoint. This information, or representation, is delivered in one of several formats via HTTP: JSON (Javascript Object Notation), HTML, XLT, Python, PHP, or plain text.
In order for an API to be considered RESTful, it has to conform to these criteria:
REST APIs - FreeCodeCamp
https://www.freecodecamp.org/news/rest-apis/
What Is A RESTful API? Explanation of REST & HTTP - Traversy Media
https://youtu.be/Q-BpqyOT3a8
Statelessness
https://stackoverflow.com/questions/3105296/if-rest-applications-are-supposed-to-be-stateless-how-do-you-manage-sessions
Statelessness means that every HTTP request happens in complete isolation and the server does not store any state about the client session on the server side.
When the client makes an HTTP request, it includes all the information necessary for the server to fulfill that request. The server never relies on information from previous requests. If that information was important, the client would have to send it again in subsequent request. A stateless application is also easy to cache.
The client's application state should never be stored on the server, but passed around from the client to every place that needs it. That is where the ST in REST comes from, State Transfer. You transfer the state around instead of having the server store it. This is the only way to scale to millions of concurrent users.
CRUD vs REST
https://softwareengineering.stackexchange.com/questions/120716/difference-between-rest-and-crud
https://nordicapis.com/crud-vs-rest-whats-the-difference/
https://tyk.io/rest-never-crud/
Create, Read, Update, and Delete — CRUD — are the four major functions for interacting with database applications. REST operates on resource representations, each identified by an URL.
REST and SOAP in plain english - StackOverflow
https://stackoverflow.com/questions/209905/representational-state-transfer-rest-and-simple-object-access-protocol-soap
Alternatives to REST API
https://stackoverflow.com/questions/36101446/alternatives-to-rest-api-pattern
Netflix uses FALCOR, Facebook uses GraphQL