cURL
curl --request GET \ --url https://api.example.com/books
{ "content": [ { "isbn": "<string>", "title": "<string>", "author": { "author.id": 123, "author.name": "<string>", "author.age": 123 }, "stock": 123, "coverImage": "<string>" } ], "pageable": { "pageNumber": 123, "pageSize": 123, "sort": {}, "offset": 123, "paged": true, "unpaged": true }, "totalPages": 123, "totalElements": 123, "last": true, "first": true, "size": 123, "number": 123, "numberOfElements": 123, "empty": true }
property,direction
title,asc
stock,desc
curl -X GET "https://api.example.com/books?page=0&size=10&sort=title,asc" \ -u username:password
{ "content": [ { "isbn": "978-0-7475-3269-9", "title": "Harry Potter and the Philosopher Stone", "author": { "id": 1, "name": "J.K. Rowling", "age": 58 }, "stock": 15, "coverImage": "https://example.com/covers/hp1.jpg" }, { "isbn": "978-0-4510-5271-5", "title": "The Great Gatsby", "author": { "id": 2, "name": "F. Scott Fitzgerald", "age": 44 }, "stock": 8 } ], "pageable": { "pageNumber": 0, "pageSize": 10, "sort": { "sorted": true, "unsorted": false, "empty": false }, "offset": 0, "paged": true, "unpaged": false }, "totalPages": 5, "totalElements": 42, "last": false, "first": true, "size": 10, "number": 0, "numberOfElements": 10, "empty": false }
page=0
isbn
title
stock