GitXplorerGitXplorer
i

books-api-lambda

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
e23bf84883e82828f65fed3c9485c78066fa1ae8

Update README.md

iiammohit26 committed 4 years ago
Unverified
c073697c2f8fe2f9d3fdb571ecf6fa4774ea2525

add readme

iiammohit26 committed 4 years ago
Unverified
da0952438fb434e603d7e2e1ba58f1c2a0131048

simple books api using lambda and dynamodb

iiammohit26 committed 4 years ago

README

The README file for this repository.

Books-api

This an example of Rest framework api built using express.js. This should be tested with POSTMAN.

Endpoints and their Uses

  1. GET: URL : https://l1w5qlr3ke.execute-api.us-east-1.amazonaws.com/dev/books Body: Not required Response: List of all the books present in the database

  2. POST: URL: https://l1w5qlr3ke.execute-api.us-east-1.amazonaws.com/dev/books Body: In postman select body->choose raw option -> Json format. Example data to be inserted in the body. { "name" : "name of the book", "price" : "price of that book", "author" : "author of that book" } Response: { "_id": "unique id generated", name" : "name of the book", "price" : "price of that book", "author" : "author of that book" }

  3. Patch (requires book id): URL: https://l1w5qlr3ke.execute-api.us-east-1.amazonaws.com/dev/books/{id} Body: In postman select body->choose raw option -> Json format. Example data to be inserted in the body. { "name" : "name of the book", "price" : "price of that book", "author" : "author of that book" }(All fields are required during updation too)

  4. GET (particular book): URL : https://l1w5qlr3ke.execute-api.us-east-1.amazonaws.com/dev/books/{id} Body: Not required Response: information about that book

  5. DELETE (requires book id): URL : https://l1w5qlr3ke.execute-api.us-east-1.amazonaws.com/dev/books/{id} Body: Not required