1
+ {
2
+ "info" : {
3
+ "_postman_id" : " 1c12c720-dd7d-469c-842c-c7a9ba6a5f35" ,
4
+ "name" : " OnlyFullStack Employee Collection" ,
5
+ "schema" : " https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6
+ },
7
+ "item" : [
8
+ {
9
+ "name" : " Get All Employees" ,
10
+ "request" : {
11
+ "method" : " GET" ,
12
+ "header" : [
13
+ {
14
+ "key" : " Accept" ,
15
+ "value" : " application/xml" ,
16
+ "type" : " text" ,
17
+ "disabled" : true
18
+ }
19
+ ],
20
+ "body" : {
21
+ "mode" : " raw" ,
22
+ "raw" : " "
23
+ },
24
+ "url" : {
25
+ "raw" : " localhost:8088/employees" ,
26
+ "host" : [
27
+ " localhost"
28
+ ],
29
+ "port" : " 8088" ,
30
+ "path" : [
31
+ " employees"
32
+ ]
33
+ }
34
+ },
35
+ "response" : []
36
+ },
37
+ {
38
+ "name" : " Get Employee" ,
39
+ "request" : {
40
+ "method" : " GET" ,
41
+ "header" : [
42
+ {
43
+ "key" : " Accept" ,
44
+ "value" : " application/xml" ,
45
+ "type" : " text" ,
46
+ "disabled" : true
47
+ }
48
+ ],
49
+ "body" : {
50
+ "mode" : " raw" ,
51
+ "raw" : " "
52
+ },
53
+ "url" : {
54
+ "raw" : " localhost:8088/employees/2" ,
55
+ "host" : [
56
+ " localhost"
57
+ ],
58
+ "port" : " 8088" ,
59
+ "path" : [
60
+ " employees" ,
61
+ " 2"
62
+ ]
63
+ }
64
+ },
65
+ "response" : []
66
+ },
67
+ {
68
+ "name" : " Save Employee" ,
69
+ "request" : {
70
+ "method" : " POST" ,
71
+ "header" : [
72
+ {
73
+ "key" : " Content-Type" ,
74
+ "name" : " Content-Type" ,
75
+ "value" : " application/json" ,
76
+ "type" : " text"
77
+ }
78
+ ],
79
+ "body" : {
80
+ "mode" : " raw" ,
81
+ "raw" : " {\n\t\" firstName\" : \" Only\" ,\n\t\" lastName\" : \" FullStack\" ,\n\t\" email\" : \" onlyfullstack@gmail.com\" ,\n\t\" salary\" : \" 10000\"\n }"
82
+ },
83
+ "url" : {
84
+ "raw" : " localhost:8088/employees" ,
85
+ "host" : [
86
+ " localhost"
87
+ ],
88
+ "port" : " 8088" ,
89
+ "path" : [
90
+ " employees"
91
+ ]
92
+ }
93
+ },
94
+ "response" : []
95
+ },
96
+ {
97
+ "name" : " Update Employee" ,
98
+ "request" : {
99
+ "method" : " PUT" ,
100
+ "header" : [
101
+ {
102
+ "key" : " Content-Type" ,
103
+ "name" : " Content-Type" ,
104
+ "value" : " application/json" ,
105
+ "type" : " text"
106
+ }
107
+ ],
108
+ "body" : {
109
+ "mode" : " raw" ,
110
+ "raw" : " {\n\t\" firstName\" : \" XYZ\" ,\n\t\" lastName\" : \" ABC\" ,\n\t\" email\" : \" xyzabc@gmail.com\" ,\n\t\" salary\" : \" 10000\"\n }"
111
+ },
112
+ "url" : {
113
+ "raw" : " localhost:8088/employees/3" ,
114
+ "host" : [
115
+ " localhost"
116
+ ],
117
+ "port" : " 8088" ,
118
+ "path" : [
119
+ " employees" ,
120
+ " 3"
121
+ ]
122
+ }
123
+ },
124
+ "response" : []
125
+ },
126
+ {
127
+ "name" : " Delete Employee" ,
128
+ "request" : {
129
+ "method" : " DELETE" ,
130
+ "header" : [
131
+ {
132
+ "key" : " Content-Type" ,
133
+ "name" : " Content-Type" ,
134
+ "type" : " text" ,
135
+ "value" : " application/json"
136
+ }
137
+ ],
138
+ "body" : {
139
+ "mode" : " raw" ,
140
+ "raw" : " "
141
+ },
142
+ "url" : {
143
+ "raw" : " localhost:8088/employees/1" ,
144
+ "host" : [
145
+ " localhost"
146
+ ],
147
+ "port" : " 8088" ,
148
+ "path" : [
149
+ " employees" ,
150
+ " 1"
151
+ ]
152
+ }
153
+ },
154
+ "response" : []
155
+ },
156
+ {
157
+ "name" : " OAuth Token Request" ,
158
+ "event" : [
159
+ {
160
+ "listen" : " test" ,
161
+ "script" : {
162
+ "id" : " 3dbd6464-f5e2-4d6f-b574-e2d80514525f" ,
163
+ "exec" : [
164
+ " var jsonData = JSON.parse(responseBody);" ,
165
+ " postman.setEnvironmentVariable(\" access_token\" , jsonData.access_token);"
166
+ ],
167
+ "type" : " text/javascript"
168
+ }
169
+ }
170
+ ],
171
+ "request" : {
172
+ "auth" : {
173
+ "type" : " basic" ,
174
+ "basic" : [
175
+ {
176
+ "key" : " username" ,
177
+ "value" : " rest-assured" ,
178
+ "type" : " string"
179
+ },
180
+ {
181
+ "key" : " password" ,
182
+ "value" : " password" ,
183
+ "type" : " string"
184
+ }
185
+ ]
186
+ },
187
+ "method" : " POST" ,
188
+ "header" : [
189
+ {
190
+ "key" : " Content-Type" ,
191
+ "name" : " Content-Type" ,
192
+ "value" : " application/x-www-form-urlencoded" ,
193
+ "type" : " text"
194
+ }
195
+ ],
196
+ "body" : {
197
+ "mode" : " urlencoded" ,
198
+ "urlencoded" : [
199
+ {
200
+ "key" : " username" ,
201
+ "value" : " onlyfullstack" ,
202
+ "type" : " text"
203
+ },
204
+ {
205
+ "key" : " password" ,
206
+ "value" : " secret" ,
207
+ "type" : " text"
208
+ },
209
+ {
210
+ "key" : " grant_type" ,
211
+ "value" : " password" ,
212
+ "type" : " text"
213
+ }
214
+ ]
215
+ },
216
+ "url" : {
217
+ "raw" : " localhost:8088/oauth/token" ,
218
+ "host" : [
219
+ " localhost"
220
+ ],
221
+ "port" : " 8088" ,
222
+ "path" : [
223
+ " oauth" ,
224
+ " token"
225
+ ]
226
+ }
227
+ },
228
+ "response" : []
229
+ },
230
+ {
231
+ "name" : " OAuth Secured Get call" ,
232
+ "request" : {
233
+ "auth" : {
234
+ "type" : " bearer" ,
235
+ "bearer" : [
236
+ {
237
+ "key" : " token" ,
238
+ "value" : " {{access_token}}" ,
239
+ "type" : " string"
240
+ }
241
+ ]
242
+ },
243
+ "method" : " GET" ,
244
+ "header" : [],
245
+ "body" : {
246
+ "mode" : " raw" ,
247
+ "raw" : " "
248
+ },
249
+ "url" : {
250
+ "raw" : " localhost:8088/students/2" ,
251
+ "host" : [
252
+ " localhost"
253
+ ],
254
+ "port" : " 8088" ,
255
+ "path" : [
256
+ " students" ,
257
+ " 2"
258
+ ]
259
+ }
260
+ },
261
+ "response" : []
262
+ }
263
+ ]
264
+ }
0 commit comments