-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStore Application API.txt
More file actions
97 lines (50 loc) · 2.94 KB
/
Copy pathStore Application API.txt
File metadata and controls
97 lines (50 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Store Application API
After Run Project
** User **
1- login
* Description : Using Username, Password you will get message success in the case of valid authentication
and failure message in case of invalid authentication.
* http://localhost:8080/StoreApplicationAPI/{username}/{password}
2- Add User
* Description : Add user to store you will enter username , password , mail , address , phone this is mandatory.
* http://localhost:8080/StoreApplicationAPI/addUser?name=ahmdsa3ed&pass=asaied&mail=ahmds3ed@outlook.com&address=addr1&phone=01100928802
you will get this message (User Added Successfully ...).
** Category **
1- Add new category
* Description : Add system Category.
* http://localhost:8080/StoreApplicationAPI/addCategory?name=catName&desc=descriptionForCategory
- you will get message for sucess or failure.
2- Rename Category
* Description : change Name of Existing Category.
* http://localhost:8080/StoreApplicationAPI/renameCategory/{oldName}/{newName}
- you will get object after updated.
3- Delete Category
* http://localhost:8080/StoreApplicationAPI/deleteCategory/{categoryName}
- you will get message for sucess or failure.
4- List all Category
* http://localhost:8080/StoreApplicationAPI/allCategory
- you will get list of category.
** Product **
1- Add Product
* Description : Add Product to store you will enter name , description , price , quentity , category this is mandatory.
* http://localhost:8080/StoreApplicationAPI/addProduct/{categoryName}?name=islamicHistory&desc=description for product&price=200&quentity=8
if you enter invalid category name you will get this message (Product Must Be In Category . Plz Enter a vaild Category).
if you enter valid category and vaild product you will get this message (Product Added Failed ...).
if you enter valid category and vaild product you will get this message (Product Added Successfully ...).
2- Update Product
* Description: Update existing product you can Update name , price , quentity , category.
* http://localhost:8080/StoreApplicationAPI/updateProduct/{productName}?name=islamicHistory&desc=description for product&price=200&quentity=8
add only attributes that you want to update like name or desc or category
ex : update Product name
-http://localhost:8080/StoreApplicationAPI/updateProduct/{productName}?name=islamicHistory
-you will get project after updated.
3- Delete Product
* Description : Delete existing product.
* http://localhost:8080/StoreApplicationAPI/deleteProduct/{productName}
- you will get message for sucess or failure.
4- Get all products From Category
* Description : get all products in specific category.
* http://localhost:8080/StoreApplicationAPI/Products/{categoryName}
- you will get list of products.
5- Get all products
* http://localhost:8080/StoreApplicationAPI/allProducts