Books.API is a simple API for managing books, authors, and categories. It allows you to create, retrieve, update, and delete books. This API is designed to help manage book information in a structured manner.
The API is documented using the OpenAPI 3.0.1 specification.
The base URL for the API is /api.
Create a new book.
- Tags: Books
- Request Body:
- Content Types: application/json, text/json, application/*+json
- Schema: Book
- Responses:
- 200: Success
Retrieve all books.
- Tags: Books
- Responses:
- 200: Success
Retrieve a book by its ID.
- Tags: Books
- Parameters:
- Path Parameters:
- id (integer, required): The ID of the book.
- Path Parameters:
- Responses:
- 200: Success
Delete a book by its ID.
- Tags: Books
- Parameters:
- Path Parameters:
- id (integer, required): The ID of the book.
- Path Parameters:
- Responses:
- 200: Success
Update a book by its ID.
- Tags: Books
- Parameters:
- Path Parameters:
- id (integer, required): The ID of the book.
- Path Parameters:
- Request Body:
- Content Types: application/json, text/json, application/*+json
- Schema: Book
- Responses:
- 200: Success
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"authors": {
"type": "string",
"nullable": true
},
"title": {
"type": "string",
"nullable": true
},
"price": {
"type": "number",
"format": "double"
},
"image": {
"type": "string",
"format": "byte",
"nullable": true
},
"category": {
"$ref": "#/components/schemas/Category"
},
"categoryId": {
"type": "integer",
"format": "int32",
"nullable": true
},
"author": {
"$ref": "#/components/schemas/Author"
},
"authorId": {
"type": "integer",
"format": "int32",
"nullable": true
}
},
"additionalProperties": false
}