Library
Library endpoint for Personal Digital Book Library (PDBL)
Some of these are authenticated endpoints. You can visit authentication to register an account.
These endpoints allow you to create, read, update and delete library books and their reviews. Perfect for building a Personal Digital Book Library (PDBL) application where users can manage their book collections and reviews.
These endpoints support pagination and sorting. Read more about these features here.
The Library Book model
Prop | Type | Default |
---|---|---|
id | string | - |
title | string | - |
description | string | - |
metadata | object | - |
image | object | - |
reviews | array | - |
created | Date | - |
updated | Date | - |
owner | Profile | - |
The Library Book Review model
Prop | Type | Default |
---|---|---|
id | string | - |
comment | string | - |
rating | number | - |
reviewer | Profile | - |
book | LibraryBook | - |
created | Date | - |
updated | Date | - |
Get all library books
Retrieve all library books.
Get single library book
Retrieve a single library book by its id, including all associated reviews.
Create library book
Create a new library book entry. Only authenticated users can create books.
Please note that the image.url
property must be a fully formed URL that links to a live and publicly accessible image. The API will check the provided URL and if it cannot be accessed publicly you will receive a 400 Bad Request
error response.
Update library book
Update a library book by its id. Only the owner of the book can update it. You must provide at least one field to update.
Please note that the image.url
property must be a fully formed URL that links to a live and publicly accessible image. The API will check the provided URL and if it cannot be accessed publicly you will receive a 400 Bad Request
error response.
Delete library book
Delete a library book by its id. Only the owner of the book can delete it. This will also delete all associated reviews.
Returns an empty 204 No Content
response on success.
Create review
Create a new review for a library book. Only authenticated users can create reviews.
Update review
Update a review by its id. Only the author of the review can update it. You must provide at least one field to update.
Delete review
Delete a review by its id. Only the author of the review or the owner of the book can delete it.
Returns an empty 204 No Content
response on success.