API Express Database (0.0.1)

Download OpenAPI specification:Download

books

Retrieve all books

query Parameters
type
string
Enum: "Fiction" "Non-Fiction"

Only get books of a specific type. When Fiction only return fiction books. When Non-Fiction only return non fiction books.

topic
string

Only return books of the provided topic.

Responses

Response samples

Content type
application/json
{
  • "books": [
    ]
}

Create a book

Request Body schema: application/json
required
title
string
type
string
author
string
topic
string
publication_date
string
pages
integer

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "type": "string",
  • "author": "string",
  • "topic": "string",
  • "publication_date": "string",
  • "pages": 0
}

Response samples

Content type
application/json
{
  • "book": {
    }
}

Get a book by ID

Responses

Response samples

Content type
application/json
{
  • "book": {
    }
}

Update a book

Request Body schema: application/json
required
title
string
type
string
author
string
topic
string
publication_date
string
pages
integer

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "type": "string",
  • "author": "string",
  • "topic": "string",
  • "publication_date": "string",
  • "pages": 0
}

Response samples

Content type
application/json
{
  • "book": {
    }
}

Delete a book

Responses

Response samples

Content type
application/json
{
  • "book": {
    }
}

pets

Retrieve all pets

query Parameters
type
string

Only returns pets of the provided type (e.g. "dog")

Responses

Response samples

Content type
application/json
{
  • "pets": [
    ]
}

Create a pet

Request Body schema: application/json
required
name
string
age
integer
type
string
breed
string
has_microchip
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "age": 0,
  • "type": "string",
  • "breed": "string",
  • "has_microchip": true
}

Response samples

Content type
application/json
{
  • "pet": {
    }
}

Get a pet by ID

Responses

Response samples

Content type
application/json
{
  • "pet": {
    }
}

Update a pet

Request Body schema: application/json
required
name
string
age
integer
type
string
breed
string
has_microchip
boolean

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "age": 0,
  • "type": "string",
  • "breed": "string",
  • "has_microchip": true
}

Response samples

Content type
application/json
{
  • "pet": {
    }
}

Delete a pet

Responses

Response samples

Content type
application/json
{
  • "pet": {
    }
}