@@ -52,5 +52,75 @@ Simple springboot API for addressBook. Supports all REST controllers and have cu
52
52
## Updates
53
53
* To be added
54
54
55
- ## API supports all REST mappings (GET, POST, PUT, DELETE)
55
+ # API supports all REST mappings (GET, POST, PUT, DELETE)
56
+ All of these requests made in these screenshot are from remote database with about 200ms ping, so response is slow.
56
57
### GET requests
58
+ * Get all records saved in the addressBook.
59
+ ```
60
+ localhost:7090/api/getAll
61
+ ```
62
+
63
+ 
64
+
65
+ * Get By ID or EmailAddress (Both are Unique field)
66
+ ```
67
+ localhost:7090/api/get/{parameter}
68
+ ```
69
+
70
+ 
71
+
72
+ ### POST requests (with error handling)
73
+ * Add single record
74
+ ```
75
+ localhost:7090/api/
76
+
77
+ {
78
+ "firstName" : "firstName",
79
+ "lastName" : "lastName",
80
+ "email" : "valid@email",
81
+ "address" : "Any address???",
82
+ "phoneNo" : "000000000"
83
+ }
84
+ ```
85
+
86
+
87
+ 
88
+
89
+ * Add multiple records
90
+ ```
91
+ localhost:7090/api/saveAll
92
+ [
93
+ {
94
+ "firstName" : "firstName",
95
+ "lastName" : "lastName",
96
+ "email" : "valid@email",
97
+ "address" : "Any address???",
98
+ "phoneNo" : "000000000"
99
+ },
100
+
101
+ {
102
+ "firstName" : "firstName",
103
+ "lastName" : "lastName",
104
+ "email" : "valid@email",
105
+ "address" : "Any address???",
106
+ "phoneNo" : "000000000"
107
+ }
108
+
109
+ ]
110
+ ```
111
+
112
+ 
113
+
114
+
115
+ ### DELETE requests (Support delete by either id or email)
116
+ ```
117
+ localhost:7090/api/
118
+ ```
119
+ ![ image] ( http://200.showy.life:6969/nIFHIq7bVM.gif )
120
+
121
+ ### PUT requests (need id or email to not be null)
122
+ ```
123
+ localhost:7090/api/
124
+ ```
125
+
126
+ ![ image] ( http://200.showy.life:6969/0PSIsehkdY.gif )
0 commit comments