What REST is in IT: how applications communicate

When developing applications and connecting systems, you almost always run into the term REST or REST API. It sounds technical, but the principle is surprisingly logical. Let us explain what REST is and how, thanks to it, applications communicate.
Briefly: what an API is
First a reminder. An API is an interface through which two applications agree and exchange data. The topic is covered in a separate article on what an API and webhook are. REST is then a specific and most widespread way to build such an API.
What REST is
REST (Representational State Transfer) is an architectural style, that is a set of rules for how applications should communicate over the internet. It is not a program or a technology, but a proven way to design an interface so that it is simple, clear and easy to use. An API built according to these rules is called RESTful.
REST builds on what the internet already commonly uses, especially the HTTP protocol, the same one that loads websites.
How REST works
The basic idea is simple. Everything revolves around resources, which are the data we work with, for example a customer, an order or a product. Each resource has its own address (URL) and is worked with using HTTP methods:
- GET reads data (for example show the list of orders).
- POST creates a new record (create a new order).
- PUT or PATCH modifies an existing record.
- DELETE removes a record.
So the application sends a request to the resource’s address with the appropriate method and the server responds with data, most often in JSON format, which is clear and easy to process.
An example in plain language: the application tells the server via GET “give me order number 42” and the server returns its data in JSON. Via DELETE it would delete it.
Main characteristics of REST
- Statelessness. Each request contains everything needed and the server remembers nothing between them. This simplifies scaling.
- A unified structure. Resource addresses and methods are consistent and predictable.
- Technology independence. A REST API can be called by a website, a mobile app and another server, regardless of what they are written in.
- Builds on HTTP, so it works over ordinary internet infrastructure.
Where REST is used
REST is everywhere today where applications communicate:
- Mobile apps that pull data from a server.
- Websites and e-shops connected with other systems, this relates to the article on how to build a quality e-shop or website.
- Connecting company systems (accounting, warehouse, CRM).
- Payment gateways, maps, weather and thousands of other services.
REST and alternatives
REST is not the only approach. There are also others (for example GraphQL or the older SOAP) that suit specific cases. But for the vast majority of projects REST is the right and proven choice thanks to its simplicity and widespread use.
Conclusion
REST is an agreed and proven way for applications to communicate over the internet. It works with resources, uses ordinary HTTP methods and sends data most often in JSON. Thanks to its simplicity and technology independence, it has become the standard of modern system integration.
Need to connect your systems or build an application with a REST API? Get in touch, we will design and create a tailored solution.
This article is part of our Software and system overview.
Need help with IT?
We will take care of your computers, networks and security - for businesses and households in the Liptov region.
Contact us