cURL
curl --request GET \ --url https://api.example.com/api/books
{ "success": true, "data": { "content": [ { "id": 123, "isbn": "<string>", "title": "<string>", "description": "<string>", "coverImageUrl": "<string>", "authors": [ { "id": 123, "name": "<string>" } ], "category": { "id": 123, "name": "<string>" } } ], "pageable": {}, "totalPages": 123, "totalElements": 123, "size": 123, "number": 123, "first": true, "last": true, "empty": true } }
Retrieve a paginated list of all books
GET /api/books
id
title,asc
isbn,desc
curl -X GET "http://localhost:8080/api/books?page=0&size=10&sort=title,asc"
{ "success": true, "data": { "content": [ { "id": 1, "isbn": "9780134685991", "title": "Effective Java", "description": "A comprehensive guide to Java programming best practices and design patterns.", "coverImageUrl": "https://example.com/covers/effective-java.jpg", "authors": [ { "id": 1, "name": "Joshua Bloch" } ], "category": { "id": 2, "name": "Programming" } }, { "id": 2, "isbn": "9780132350884", "title": "Clean Code", "description": "A handbook of agile software craftsmanship.", "coverImageUrl": "https://example.com/covers/clean-code.jpg", "authors": [ { "id": 2, "name": "Robert C. Martin" } ], "category": { "id": 2, "name": "Programming" } } ], "pageable": { "sort": { "sorted": true, "unsorted": false, "empty": false }, "pageNumber": 0, "pageSize": 10, "offset": 0, "paged": true, "unpaged": false }, "totalPages": 5, "totalElements": 42, "size": 10, "number": 0, "first": true, "last": false, "empty": false }, "message": null }