API Documentation#

Books#

POST /books/lend/{id}#

Lend a book

Marks the book with the given ID as lent.

Parameters:
  • id (integer) โ€“

Status Codes:
GET /books/lent#

Get lent books

Retrieves a list of books that are currently lent out.

Example request:

GET /books/lent HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK โ€“

    List of lent books returned successfully

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    [
        {
            "id": 1,
            "title": "string",
            "lent": true
        }
    ]
    

GET /books/available#

Get available books

Retrieves a list of all currently available books in the library.

Example request:

GET /books/available HTTP/1.1
Host: example.com
Status Codes:
  • 200 OK โ€“

    List of available books returned successfully

    Example response:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    [
        {
            "id": 1,
            "title": "string",
            "lent": true
        }
    ]