REST is a set of guidelines for architecting an API with Uniform Resource Identifiers (URI). It isn’t restricted to use on HTTP APIs, but it is nearly always spoken of in this context. A REST API is the typical web interface used to send data back and forth between the frontend and backend of a web app.
A web app hooks up to a backend using an HTTP-based API. HTTP has a several different “verbs": GET, PUT, POST and DELETE. Typically, a web API needs to do a few actions: Create, Read Update and Delete (CRUD) elements like users or tweets or whatever.
REST, standing for Representational State Transfer, gives recommendations for how to map these CRUD actions onto URL routes and HTTP verbs. For example, DELETEs should be idempotent, meaning that if you run the same request multiple times it won’t have any side effects. Designing your api to delete a tweet to be:
or whatever other alternative is wise because requests can easily be lost or duplicated due to network errors. In the second design example, you may accidentally delete multiple tweets if the request was spuriously sent twice.
Following the conventions of REST when designing your APIs make them safe, predictable, and easy to understand by other devs who are aware of the common convention. it is so common that it’s a safe bet that other websites APIs, like twitter’s, will be “RESTful”.