/api/v1/books/title

GET /api/v1/books/<string:title>

Description

This endpoint allows users to retrieve a list of books based on a specified title.

Parameters

All parameters are optional, if there is no specific value provided, default will be used.

  • page: Page number for pagination. Default is 1 (int).
  • limit: Number of books per page. Default is 10 (int).
  • sort_type: Type of sorting based on a book characteristic. Default is id (str).
  • sort_order: Sorting order of the results. 1 for ascending and -1 for descending. Default is 1 (int).

Request

Response

The response will show books that match the specified title, with pagination details. For example, if the title is "Flex" there will be 2 matching results, two book titles that start with "Flex".

{
    "books": [
        {
            "_id": "6123d2c4a3490d001f2cf0db",
            "title": "Flex 3 in Action",
            // More book information
        },
        {
            "_id": "6123d2c4a3490d001f2cf0dc",
            "title": "Flex 4 in Action",
            // More book information
        }
        // 3 more books
    ],
    "pageCurrent": 1,
    "pagePrevious": null,
    "pageNext": null,
    "pageLast": 1,
    "items": 5
}