Skip to content

API that takes an excel file as input, parses it and stores the data in the database.

Notifications You must be signed in to change notification settings

aditirao7/excelapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pets Excel API

API that takes an excel file as input, parses it and stores the data in the database.

Tech Stack and libraries needed:

  1. npm
  2. Node JS
  3. Nodemon
  4. Express
  5. MongoDB Atlas
  6. Mongoose
  7. PostMan
  8. convert-excel-to-json library

Documentation to run code on local host:

  1. Clone this repository: git clone https://github.com/aditirao7/excelapi.git
  2. Install Node JS and npm.
  3. Navigate to the git directory and run npm install
  4. Then run npm run start
  5. The app will now be up and running on localhost:8080.

Interacting with the API using PostMan

  1. The excel file can be uploaded either directly through PostMan or through the form on the homepage:

Postman upload Form upload

  1. The sample excel file here had 3 data records.

  2. POST route “/api/pet” can be used to upload in PostMan:

Post

  1. GET route “/api/pet” to get all the pets in the database:

GetAll

  1. GET route “/api/pet/:petId” to get a specific pet:

GetOne

  1. PATCH route “/api/pet/:petId” to update the details of a specific pet: (make sure the type of the raw data sent is selected as JSON)

patch patchoutput

  1. DELETE route “/api/pet/:petId” to delete a specific pet:

delete deleteoutput

  • Similarly API can be interacted with on the herokuapp through PostMan as well, initial URL changes from localhost:8080 to https://fastjobsapi.herokuapp.com and the routes remain the same. (If it is not a POST or PATCH request make sure to select none in request body in PostMan otherwise it tends to give a 503 status error)

About

API that takes an excel file as input, parses it and stores the data in the database.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published