Catalog API (1.0)

Download OpenAPI specification:

Catalog REST API Documentation

Add a book

Add a book

Request Body schema: application/json
required

the book data

isbn
required
string [ 10 .. 13 ] characters
title
required
string non-empty
subtitle
string
authors
required
string non-empty
publisher
required
string non-empty
publicationYear
integer >= 1000
numberOfPages
integer >= 0
description
string
imageUrl
string <uri>
price
required
number >= 0

Responses

Request samples

Content type
application/json
{
  • "isbn": "0764574833",
  • "title": "Professional Java Development with the Spring Framework",
  • "authors": "Rod Johnson, Juergen Hoeller, et al.",
  • "publisher": "Wrox",
  • "publicationYear": 2005,
  • "numberOfPages": 676,
  • "price": 57.5
}

Response samples

Content type
application/json
{
  • "isbn": "0764574833",
  • "title": "Professional Java Development with the Spring Framework",
  • "authors": "Rod Johnson, Juergen Hoeller, et al.",
  • "publisher": "Wrox",
  • "publicationYear": 2005,
  • "numberOfPages": 676,
  • "price": 57.5
}

Search for books

Search for books

query Parameters
keywords
required
string
Example: keywords=spring,boot

comma-separated list of keywords to search for

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Find a book

Find a book

path Parameters
isbn
required
string
Example: 0764574833

the ISBN of the book

Responses

Response samples

Content type
application/json
{
  • "isbn": "0764574833",
  • "title": "Professional Java Development with the Spring Framework",
  • "authors": "Rod Johnson, Juergen Hoeller, et al.",
  • "publisher": "Wrox",
  • "publicationYear": 2005,
  • "numberOfPages": 676,
  • "price": 57.5
}

Update a book

Update a book

path Parameters
isbn
required
string
Example: 0764574833

the ISBN of the book

Request Body schema: application/json
required

the new book data (ISBN must match path parameter)

isbn
required
string [ 10 .. 13 ] characters
title
required
string non-empty
subtitle
string
authors
required
string non-empty
publisher
required
string non-empty
publicationYear
integer >= 1000
numberOfPages
integer >= 0
description
string
imageUrl
string <uri>
price
required
number >= 0

Responses

Request samples

Content type
application/json
{
  • "isbn": "0764574833",
  • "title": "Professional Java Development with the Spring Framework",
  • "authors": "Rod Johnson, Juergen Hoeller, et al.",
  • "publisher": "Wrox",
  • "publicationYear": 2005,
  • "numberOfPages": 676,
  • "price": 57.5
}

Response samples

Content type
application/json
{
  • "isbn": "0764574833",
  • "title": "Professional Java Development with the Spring Framework",
  • "authors": "Rod Johnson, Juergen Hoeller, et al.",
  • "publisher": "Wrox",
  • "publicationYear": 2005,
  • "numberOfPages": 676,
  • "price": 57.5
}