HATS Report API Specification
Protected Routes
All of these routes must be called by a user that is already authenticated.
Add Book Log For a School
Used to create a new report for a specified school that has a library.
POST request to /api/v1/protected/schools/:school_id/books
Responses:
201 OK: returns the book log that was successfully created for the school.
1 2 3 4 5 6 | |
Get Log For a School
Used to create a new report for a specified school that has a library.
GET request to /api/v1/protected/schools/:school_id/books
Responses:
200 OK: returns the book log that for the school.
1 2 3 4 5 6 7 8 9 10 11 | |
Update School Book Log (Admin or report creator only)
Used to update a book log report for a given school
PUT request to /api/v1/protected/schools/:school_id/books/:book_id
1 2 3 4 5 6 | |
200 OK : Book log successfully updated
404 Does not exist : School or Book Log does not exist
401 Unauthorized : User not authenticated
Delete School Book Log (Admin or report creator only)
Used to delete a book log report for a given school
DELETE request to /api/v1/protected/schools/:school_id/books/:book_id
Responses:
200 OK : Book log successfully updated
404 Does not exist : School or Book Log does not exist
401 Unauthorized : User not authenticated