Download OpenAPI specification:
A RESTful API for managing a book collection in Program Design and Implementation I.
Returns all books in the collection. Use query parameters to filter results.
Example searches:
/books?title=gatsby - Find books with "gatsby" in the title/books?author=klune - Find books by Klune/books?genre=fantasy - Find fantasy books/books?author=bennett&genre=literary - Combine filters| title | string Example: title=pachinko Filter by title (case-insensitive partial match) |
| author | string Example: author=klune Filter by author (case-insensitive partial match) |
| genre | string Example: genre=fantasy Filter by genre (case-insensitive partial match) |
[- {
- "id": 1,
- "title": "Pachinko",
- "author": "Min Jin Lee",
- "year": 2017,
- "genres": [
- "Historical Fiction",
- "Family Saga"
], - "isbn": "978-1455563920",
- "stock": 14
}, - {
- "id": 2,
- "title": "The Nightingale",
- "author": "Kristin Hannah",
- "year": 2015,
- "genres": [
- "Historical Fiction",
- "War",
- "Romance"
], - "isbn": "978-0312577223",
- "stock": 9
}, - {
- "id": 3,
- "title": "Homegoing",
- "author": "Yaa Gyasi",
- "year": 2016,
- "genres": [
- "Literary Fiction",
- "Historical Fiction",
- "Family Saga"
], - "isbn": "978-1101947135",
- "stock": 11
}
]| title | string Book title |
| author | string Author name |
| year | integer Publication year |
| genres | string Comma-separated list of genres |
| isbn | string ISBN number |
| stock | integer Available stock quantity |
{- "id": 22,
- "title": "Tomorrow, and Tomorrow, and Tomorrow",
- "author": "Gabrielle Zevin",
- "year": 2022,
- "genres": [
- "Fiction",
- "Friendship",
- "Coming of Age"
], - "isbn": "978-0735243347",
- "stock": 5
}| id required | integer The book ID |
| title | string Book title |
| author | string Author name |
| year | integer Publication year |
| genres | string Comma-separated list of genres |
| isbn | string ISBN number |
| stock | integer Available stock quantity |
{- "id": 1,
- "title": "Pachinko",
- "author": "Min Jin Lee",
- "year": 2017,
- "genres": [
- "Historical Fiction",
- "Family Saga"
], - "isbn": "978-1455563920",
- "stock": 14
}[- "Arundhati Roy",
- "Brit Bennett",
- "Chimamanda Ngozi Adichie",
- "Kaliane Bradley",
- "Kristin Hannah",
- "Michelle Zauner",
- "Min Jin Lee",
- "Ocean Vuong",
- "Silvia Moreno-Garcia",
- "Susanna Clarke",
- "TJ Klune",
- "Yaa Gyasi"
]Returns all books by a specific author. Author name must be URL-encoded.
| name required | string Example: Susanna%20Clarke The author's name (URL-encoded) |
[- {
- "id": 7,
- "title": "Piranesi",
- "author": "Susanna Clarke",
- "year": 2020,
- "genres": [
- "Fantasy",
- "Mystery"
], - "isbn": "978-1635575637",
- "stock": 10
}
]