Skip to content

rk101288/nodejs-restful-service

Repository files navigation

nodejs-restful-service

How to run the app:

How to use the api:

  • Start with login - POST to localhost:3000/login/richa with body {"password": "test123"}. Specify Content-Type of application/json
  • Get all Configurations - localhost:3000/configuration
  • Get by name - localhost:3000/configuration/name/host1
  • Get by hostname - localhost:3000/configuration/hostname/nessus-ntp.lab.com
  • Get by port - localhost:3000/configuration/port/1241
  • Get by username - localhost:3000/configuration/username/toto
  • Create new configuration - POST to localhost:3000/configuration with body {"name": "host3","hostname": "test.lab.com","port": "5555", "username":"test"}
  • Update a configuration - PUT to localhost:3000/configuration/id/{id} with desired updates.
  • Delete a configuration - localhost:3000/configuration/id/{id}
  • Paging - localhost:3000/configuration/commonProperty/something10?page=2
  • Paging - localhost:3000/configuration/?page=2
  • Sorting - localhost:3000/configuration/?sort_by=port&sort_order=asc
  • Sorting - localhost:3000/configuration/?sort_by=port&sort_order=asc
  • Sorting - localhost:3000/configuration/?sort_by=hostname
  • Sorting and Paging - localhost:3000/configuration/?sort_by=hostname&sort_order=desc&page=4
  • End with logout - Delete localhost:3000/login/richa

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published