Bookstore API (1.0.0)

Download OpenAPI specification:Download

This is a sample Bookstore Server based on the OpenAPI 3.0 specification.

Created by Gabriel Aichinger and Daniel Harka.

Retrieve all books

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a new book

Request Body schema: application/json
username
string
password
string
title
string
author_id
integer
published_year
integer

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string",
  • "title": "string",
  • "author_id": 0,
  • "published_year": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "author_id": 0,
  • "published_year": 0
}

Retrieve a specific book

path Parameters
bookId
required
integer

ID of the book to retrieve

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "author_id": 0,
  • "published_year": 0
}

Update a specific book

path Parameters
bookId
required
integer

ID of the book to update

Request Body schema: application/json
username
string
password
string
title
string
author_id
integer
published_year
integer

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string",
  • "title": "string",
  • "author_id": 0,
  • "published_year": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "author_id": 0,
  • "published_year": 0
}

Delete a specific book

path Parameters
bookId
required
integer

ID of the book to delete

Responses

Retrieve all authors

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a new author

Request Body schema: application/json
username
string
password
string
id
integer
name
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string",
  • "id": 0,
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string"
}

Retrieve a specific author

path Parameters
authorId
required
integer

ID of the author to retrieve

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string"
}

Update a specific author

path Parameters
authorId
required
integer

ID of the author to update

Request Body schema: application/json
username
string
password
string
id
integer
name
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string",
  • "id": 0,
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string"
}

Delete a specific author

path Parameters
authorId
required
integer

ID of the author to delete

Responses

Retrieve all books by a specific author

path Parameters
authorId
required
integer

ID of the author

Responses

Response samples

Content type
application/json
[
  • {
    }
]