Skip to content

An implementation of Software Seni's REST API standard in NodeJS

Notifications You must be signed in to change notification settings

obetss/rest-api-training-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API Training Example

The purpose of this project is to provide API endpoints that will handle these scenario:

  1. An endpoint to search products based on
    1. Product name
    2. Product category
    3. Seller name
  2. An endpoint to get the details of a product.
  3. An endpoint to update the name of the product
  4. An endpoint to create a product
  5. An endpoint to delete a product
  6. An endpoint to bulk delete categories
  7. An endpoint to allow admin to blacklist a seller
  8. An endpoint to search sellers based on
    1. Seller name
    2. Product name
# URL HTTP Methods Payload Samples Description
1 /api/v1/products GET Example query: /api/v1/products?product=Samsung&category=Phone&seller=Samsung&page=1&limit=10 An endpoint to search products based on product name, product category, seller name.
2 /api/v1//products/1 GET An endpoint to get the details of a product.
3 /api/v1/products/1 PATCH Example data: { name: "Samsung S10" } An endpoint to update the name of the product
4 /api/v1/products POST Example data: { name: "Samsung S10", categories: ["Phones", "Mobile Devices"], seller: "Samsung" } An endpoint to create a product
5 /api/v1/products/1 DELETE An endpoint to delete a product
6 /api/v1/categories DELETE Example data: { categoryIds: [1, 2, 3, 4, 5] } An endpoint to bulk delete categories
7 /api/v1/sellers/2 PATCH Example data: { blacklisted: true } An endpoint to allow admin to blacklist a seller
8 /api/v1/sellers GET Example query: /api/v1/sellers?product=Samsung&seller=Samsung&page=1&limit=10 An endpoint to search sellers based on seller name and product name

Notes

This repository provide bad example of REST API implementation which is part of training assessment by Software Seni training. Do not use this as example for a project development

About

An implementation of Software Seni's REST API standard in NodeJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%