cURL
curl --request GET \ --url https://api.example.com/api/authors
{ "success": true, "timestamp": "<string>", "data": { "content": [ { "id": 123, "name": "<string>" } ], "pageable": { "pageNumber": 123, "pageSize": 123, "offset": 123 }, "totalPages": 123, "totalElements": 123, "last": true, "first": true, "numberOfElements": 123, "empty": true } }
Retrieve a paginated list of all authors
GET /api/authors
id,asc
name,desc
curl -X GET "http://localhost:8080/api/authors?page=0&size=10&sort=name,asc" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json"
{ "success": true, "timestamp": "2026-03-03T10:00:00Z", "data": { "content": [ { "id": 1, "name": "George Orwell" }, { "id": 2, "name": "J.K. Rowling" }, { "id": 3, "name": "Stephen King" } ], "pageable": { "pageNumber": 0, "pageSize": 10, "offset": 0 }, "totalPages": 1, "totalElements": 3, "last": true, "first": true, "numberOfElements": 3, "empty": false } }
{ "success": false, "timestamp": "2026-03-03T10:00:00Z", "error": { "code": "UNAUTHORIZED", "message": "Authentication required" } }