All responses will have the form
{
"data": "Mixed type holding the content of the response",
"message": "Description of what happened during the request"
}
Subsequent response definitions will only detail the expected value of data
Definition
GET /books
Response
200 OK
on success
[
{
"identifier": "database ID",
"title": "This is some book",
"author": "I. Wrote. Somebook",
"pageCount": 200,
"ISBN": 9783161484100
},
{
"..."
}
]
Definition
POST /devices
Arguements
"title": string
the title of the book"author": string
the author of the book"pageCount": int
the number of pages the book has"ISBN": int
the ISBN of the book
If a book with the same title exists already, that book is overwritten and the new book is stored.
Response
201 Created
on success
{
"identifier": "database ID",
"title": "This is some book",
"author": "I. Wrote. Somebook",
"pageCount": 200,
"ISBN": 9783161484100
}
Definition
GET /book/<title>
Response
404 Not found
if the book does not exist200 OK
on success
{
"identifier": "database ID",
"title": "This is some book",
"author": "I. Wrote. Somebook",
"pageCount": 200,
"ISBN": 9783161484100
}
Definition
DELETE /book/<title>
Response
404 Not found
if the book does not exist204 No content
on success