SPRING CONCEPTS

REST / resource API

Spring Concepts / REST / resource API

REST is an architectural style centered on resources and a uniform interface.

Understand the idea

This course uses resource URLs with HTTP methods: GET reads, POST creates, PUT replaces editable state, and DELETE removes. JSON is the chosen representation, not the definition of REST itself. HTTP status codes and headers communicate outcomes.

A concrete example

GET    /api/todos
POST   /api/todos
PUT    /api/todos/{id}
DELETE /api/todos/{id}

In the application

Manual 02 returns JSON rather than template names. Manual 03 secures that resource contract with bearer tokens.

A JSON endpoint is not automatically a complete REST design. Document resource behavior, status codes, and request requirements.

Related concepts

Read the official documentation ↗
Java 21 · Spring Boot 4.1.1 · Edupoly