/ap.
DELETE
/api/Books/{id}
Figure 2 - Required APIs.
1.API to list all books (using method GET)
Create an API to list all books in the library. The result should include information such as the title, author, publisher, and publication year of each book. See F zure 1.
This API must support filtering, sorting, and pagination using OData query options like $filter, $orderby, $top, and $skip.
URL: [GET]/api/books
Example request: [GET]
/api/books?$filter=AuthorDoe'&$orderby=Publication Year desc&$top=10
'John
Request URL
http://localhost:5000/api/Books
Server response
Code
200
Details
eq
Response body
{
"bookId": 1,title": "1984",
" "authors": [
{
"authorId": 1,
"bio": "English novelist and essayist, journalist and critic."
},
"name": "George Orwell",
"authorId": 3,
"name": "J.R.R. Tolkien",
"bio": "English writer, poet, philologist, and academic."
"publisher": "
Secker & Warburg",
Zoom
"publicationYear
": 1949
}
1,
"bookId":
2,
+ 100%
Close