CRUD Operations on Categories
-
Add Category (POST)
URL:http://localhost:8080/api/categories
Body:{ "categoryId": 0, "categoryName": "String", "categoryDescription": "String", "products": [] }
-
Update Category (PUT)
URL:http://localhost:8080/api/categories/{id}
Body:{ "id": 0, "categoryId": 0, "categoryName": "String", "categoryDescription": "String", "products": [] }
-
Get All Categories (GET)
URL:http://localhost:8080/api/categories?page=0
-
Get Category by Id (GET)
URL:http://localhost:8080/api/categories/{id}
Body:{ "id": 0 }
-
Delete Category by Id (DELETE)
a. URL:http://localhost:8080/api/categories/{id}
Body:{ "id": 0 }
b. URL:http://localhost:8080/api/categories/{id}?force=true
Body:{ "id": 0 }
Delete Category by Id (DELETE)
a. URL:http://localhost:8080/api/categories/{id}
Body:{ "id": 0 }
b. URL:
http://localhost:8080/api/categories/{id}?force=true
Body:{ "id": 0 }
CRUD Operations on Products
-
Add Default Products (GET)
URL:http://localhost:8080/api/products/addDefault
-
Add New Product (POST)
URL:http://localhost:8080/api/products
Body:{ "id": 0, "name": "String", "cost": 0.0, "category": { "categoryId": 0, "categoryName": "String", "categoryDescription": "String", "products": [] } }
-
Get Product by Id (GET)
URL:http://localhost:8080/api/products/{id}
-
Get Product by Id (GET)
URL:http://localhost:8080/api/products/{id}
Body:{ "id": 0 }
-
Get All Products (GET)
URL:http://localhost:8080/api/products?page=0
-
Delete Product by Id (DELETE)
URL:http://localhost:8080/api/products/{id}
Body:{ "id": 0 }
{ "id": 0 }
-
Update Product by Id (PUT)
URL:http://localhost:8080/api/products/{id}
Body:{ "id": 0, "name": "String", "cost": 0.0, "category": { "categoryId": 0, "categoryName": "String", "categoryDescription": "String", "products": [] } }