Files
QA_Task_3/readme.md
T
2023-02-22 20:39:46 +01:00

1.4 KiB

BASE : https://mkdlabs.com Credential

APIS

Authenticate

POST /v2/api/lambda/login

Authenticates a user and returns the token which expires in an hour. Required/Mandatory Fields
email: 'required|string' password: 'required|string' role: 'required'

List Books

GET  /v2/api/custom/qa/books

List all books

Get A Book

 GET  /v2/api/custom/qa/books/:id

Get a book where id is :id

Create Book

 POST /v2/api/custom/qa/books

Creates a new book,

  • Bearer authentication required, role - admin

Required/Mandatory Body name: 'required|string', publisher: 'required|string', cost_price: 'required'

Update Book

 PUT /v2/api/custom/qa/books/:id

Updates book where id is :id,

  • Bearer authentication required, role - admin

Body name: 'sometimes|string', publisher: 'sometimes|string', cost_price: 'sometimes', selling_price: 'sometimes', author_id: 'sometimes', title_id: 'sometimes'

Delete Book

DELETE /v2/api/custom/qa/books/:id

Deletes book where id is :id,

  • Bearer authentication required, role - admin

Create Author

 POST /v2/api/custom/qa/authors

Creates a new author,

  • Bearer authentication required, role - admin

Required/Mandatory body name: 'required|string', age: 'required|number',