Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
What is REST? | RESTful API
Spring Boot Backend
course content

Conteúdo do Curso

Spring Boot Backend

Spring Boot Backend

1. Backend Development Basics
2. Spring Boot Basics
3. RESTful API
4. Working with Databases
5. Testing Backend Applications

What is REST?

We’ve already come a long way, and now it’s time to dive into something really exciting — learning REST API. As backend developers, you will almost always need to use this architectural style, and there’s no way around it.

What is REST API?

It is used for client-server interaction, where the client requests data from the server via the HTTP protocol.

Note

In the previous section, we already created our own REST API, but we didn’t cover its main principles or how to properly test it.

REST uses standard HTTP methods (GET, POST, PUT, DELETE), which simplifies working with the API for developers. Clients can interact with the server through HTTP requests, and the server returns data in convenient formats, such as JSON or XML.

Clients and servers can be implemented on different platforms and programming languages. The key is that they support the HTTP protocol.

Using REST API in the Backend

In the backend, REST API is used to provide data, perform operations on it (read, write, update, and delete), and to connect with databases and other services.

For example, in an e-commerce system, a REST API can provide product information, add new orders, or process payments.

A REST API is necessary if you want other users to interact with your application. You create the application and write descriptions for each of its endpoints — explaining what it does, what parameters it accepts, and what it returns — so that users know how to work with it.

Note

This doesn’t mean you have to manually write documentation for your application. In this section, we’ll look at an easier way to do that.

What is API?

Essentially, API acts as a bridge between two systems, enabling them to exchange information or request services.

Real-Life Example

Imagine you’re at a restaurant. You (client) want to order food, but you don’t go directly to the kitchen to place your order. Instead, you speak to the waiter (API), who takes your order, communicates it to the kitchen (server), and then brings your food to you.

Just like the waiter, API facilitates communication between two systems without requiring them to understand each other’s internal workings.

Why is REST API Relevant?

REST API is a standard for creating web services and is widely used for integrating different systems. Its flexibility, simplicity, and compatibility with various platforms have made it a very popular tool for developing modern applications.

1. What is `REST API` and what is it used for in the backend?
2. How does REST API interact with the client?

What is REST API and what is it used for in the backend?

Selecione a resposta correta

How does REST API interact with the client?

Selecione a resposta correta

Tudo estava claro?

Seção 3. Capítulo 1
We're sorry to hear that something went wrong. What happened?
some-alt