Skip to main content
GET
/
api
/
v1
/
books
/
findAll
curl -X GET "https://api.example.com/api/v1/books/findAll?page=0&size=10&author=Tolkien" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{
  "page": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "gender": "Fantasy",
      "author": "J.R.R. Tolkien",
      "image": "https://example.com/covers/lotr.jpg",
      "title": "The Lord of the Rings",
      "subtitle": "The Fellowship of the Ring",
      "publisher": "Allen & Unwin",
      "year": "1954",
      "pages": 423,
      "isbn": "978-0-618-00222-1"
    },
    {
      "id": "650e8400-e29b-41d4-a716-446655440001",
      "gender": "Fantasy",
      "author": "J.R.R. Tolkien",
      "image": "https://example.com/covers/hobbit.jpg",
      "title": "The Hobbit",
      "subtitle": "There and Back Again",
      "publisher": "Allen & Unwin",
      "year": "1937",
      "pages": 310,
      "isbn": "978-0-618-00221-4"
    }
  ],
  "count": 2,
  "limit": 10,
  "offset": 0,
  "total_pages": 1,
  "total_count": 2,
  "previous_page": null,
  "current_page": 1,
  "next_page": null
}

Authentication

This endpoint requires a valid JWT token in the Authorization header.
Authorization: Bearer <your_jwt_token>

Query Parameters

page
integer
default:"0"
The page number to retrieve (0-indexed).
size
integer
default:"10"
The number of items per page.
title
string
Filter books by title (case-sensitive partial match).
author
string
Filter books by author name (case-sensitive partial match).
gender
string
Filter books by genre/category.

Response

page
array
Array of book objects on the current page.
count
integer
The number of items on the current page.
limit
integer
The maximum number of items per page (same as size parameter).
offset
integer
The starting position (index) of the first item on the current page.
total_pages
integer
The total number of pages available.
total_count
integer
The total number of items across all pages.
previous_page
integer
The number of the previous page, or null if on the first page.
current_page
integer
The number of the current page (1-indexed for display).
next_page
integer
The number of the next page, or null if on the last page.
curl -X GET "https://api.example.com/api/v1/books/findAll?page=0&size=10&author=Tolkien" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{
  "page": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "gender": "Fantasy",
      "author": "J.R.R. Tolkien",
      "image": "https://example.com/covers/lotr.jpg",
      "title": "The Lord of the Rings",
      "subtitle": "The Fellowship of the Ring",
      "publisher": "Allen & Unwin",
      "year": "1954",
      "pages": 423,
      "isbn": "978-0-618-00222-1"
    },
    {
      "id": "650e8400-e29b-41d4-a716-446655440001",
      "gender": "Fantasy",
      "author": "J.R.R. Tolkien",
      "image": "https://example.com/covers/hobbit.jpg",
      "title": "The Hobbit",
      "subtitle": "There and Back Again",
      "publisher": "Allen & Unwin",
      "year": "1937",
      "pages": 310,
      "isbn": "978-0-618-00221-4"
    }
  ],
  "count": 2,
  "limit": 10,
  "offset": 0,
  "total_pages": 1,
  "total_count": 2,
  "previous_page": null,
  "current_page": 1,
  "next_page": null
}

Status Codes

200
OK
Books retrieved successfully.
401
Unauthorized
Missing or invalid JWT token.
403
Forbidden
Valid token but insufficient permissions.

Build docs developers (and LLMs) love