liveBook · Manning

Rest api

As explained in Spring Start Here, Second Edition

A network-accessible service that exposes resources and operations according to REST constraints.

A REST API lets one application call functionality exposed by another through HTTP endpoints. A common use is exchanging data between a web or mobile client and a backend, or between backend services. section 10.1

In Spring, an endpoint is a controller action mapped to an HTTP method and path. Unlike a view-based web response, a REST endpoint returns the action’s result directly in the HTTP response, without rendering a view. section 10.1

Keep a few practical limits in mind:

  • A slow endpoint or a request carrying a large amount of data can time out; sending more than a few megabytes in one REST call is usually not a good choice. section 10.1
  • Too many concurrent calls can put pressure on a backend and cause it to fail. section 10.1
Figure 10.1 REST services are a communication method between two apps. Today, you find REST services in many places. A web client app or mobile app may call its backend solution through REST endpoints, but even backend services might communicate using REST web service calls.

Shows how web clients, mobile apps, and backend services can communicate through REST endpoints. section 10.1

How Spring Start Here, Second Edition covers it

How deep it goes
Defines endpoint mapping and direct HTTP responses, then notes timeouts, large requests, and concurrent-call risks.
Examples
Illustrates communication between web clients, mobile apps, and backend services.
What it assumes
Assumes no prior Spring knowledge overall, while connecting endpoint mapping to earlier Spring web-app mechanisms.
What you can do after
Build Spring REST endpoints by mapping controller actions to HTTP methods and paths.
How it connects
Links REST endpoints to HTTP, controller actions, and Spring MVC.

Also explained in

Compare how 4 books explain rest api →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Start Here, Second Edition. The section links point to the parts of the book it draws on.