File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ The project is a RESTful Web API that provides endpoints to perform CRUD operati
2020
2121- ** Get All Books** : Retrieve a list of all books.
2222- ** Add Book** : Add a new book to the database.
23+ - ** Delete Book** : Delete a book by its ID.
24+ - ** Update Book** : Update an existing book.
25+ - ** Get Book by ID** : Retrieve a specific book by its ID.
2326
2427## Prerequisites
2528
@@ -61,6 +64,39 @@ The API provides the following endpoints:
6164 }
6265 ` ` `
6366
67+ Example Response:
68+ ` ` ` json
69+ {
70+ " status" : " OK"
71+ }
72+ ` ` `
73+ - ** GET /api/books/{id}** : Retrieve a specific book by its ID.
74+
75+ Example Response:
76+ ` ` ` json
77+ {
78+ " id" : 1,
79+ " title" : " The Great Gatsby" ,
80+ " description" : " A novel by F. Scott Fitzgerald" ,
81+ " author" : " F. Scott Fitzgerald" ,
82+ " price" : 10.99
83+ }
84+ ` ` `
85+ - ** DELETE /api/books/{id}** : Delete a book by its ID.
86+
87+ - ** PUT /api/books** : Update an existing book.
88+
89+ Example Request:
90+ ` ` ` json
91+ {
92+ " id" : 1,
93+ " title" : " New Title" ,
94+ " description" : " Updated description" ,
95+ " author" : " Updated Author" ,
96+ " price" : 19.99
97+ }
98+ ` ` `
99+
64100 Example Response:
65101 ` ` ` json
66102 {
You can’t perform that action at this time.
0 commit comments