REST API: CRUD, Search and Pagination

Harry · 22 Sep 2026 · 1 views
Log in to track your progress and mark lessons complete.

Endpoints

POST   /api/login
GET    /api/students?page=0&size=10&q=ali
POST   /api/students
PUT    /api/students/:id
DELETE /api/students/:id
GET    /api/reports/summary

Pagination Shape

Return content plus totalElements and totalPages so the React table can page reliably.

Status Codes

201 on create, 200 on update, 204 on delete, 400 on validation errors, 401/403 on auth failures.

Key Points

  • Thin controllers, rich services.
  • Validate every input server-side.
  • Stable contract before frontend work.
Share this post:

Comments (0)

Please login or register to comment.

Create a free account to keep reading

You've enjoyed a free tutorial! Register (it's free) to unlock every tutorial, track your progress and save code.

or sign in with your account

Already have an account? Log in