-
Notifications
You must be signed in to change notification settings - Fork 13
/
EmployeeScheduling.json.postman_collection
301 lines (301 loc) · 12.7 KB
/
EmployeeScheduling.json.postman_collection
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
{
"id": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"name": "Employee Scheduling",
"description": "Employee Scheduling API",
"order": [
"a7477494-bd9d-8788-a09a-4375267596d5",
"1c31bc50-d221-83fc-d817-4831a681e54a"
],
"folders": [
{
"id": "a2dee352-460a-12d6-af39-e5ace81ca337",
"name": "Test",
"description": "The API that runs integration tests.",
"order": [
"f3b3aad6-2eff-1a92-63aa-565b1885fee8",
"b55979aa-f4f0-0098-14b3-d714e8490089",
"b79cb081-4ff1-701d-3074-a8b0a8f47f40",
"3e89903a-e620-c96d-9a25-91507ac899ea",
"9d904023-4c63-f62f-b735-7a80d567fdf5"
],
"owner": "193151",
"lastUpdatedBy": {
"id": "193151",
"username": "Martin Micunda"
},
"lastRevision": 71758556
},
{
"id": "825efbc4-ea15-9849-a5c4-fc1d7010cc3c",
"name": "partners",
"description": "",
"order": [
"9d207270-f75a-0427-b6cf-28166fbf4919",
"dda72c39-d379-0028-3b5e-366fce077ffb",
"1d67ccad-486c-deb7-d08e-ae4912be3197",
"7106b6d8-4f5b-8176-ddd6-8c2e1d48375e",
"db93abe5-b6ce-0fce-50cf-574b1a75744a"
],
"owner": "193151",
"lastUpdatedBy": {
"id": "193151",
"username": "Martin Micunda"
},
"lastRevision": 71343452
}
],
"timestamp": 1403637842767,
"owner": "193151",
"remoteLink": "",
"public": false,
"requests": [
{
"id": "1c31bc50-d221-83fc-d817-4831a681e54a",
"headers": "Authorization: Basic dGVzdDpzZWNyZXQ=\nContent-Type: application/json\n",
"url": "http://192.168.33.20:3000/auth/signup",
"preRequestScript": "",
"pathVariables": {},
"method": "POST",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1427209040787,
"name": "/auth/signup",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": [],
"rawModeData": "{\n \"firstName\": \"Martin\",\n \"lastName\": \"Micunda\",\n \"email\": \"[email protected]\",\n \"password\": \"1234\",\n \"passwordConfirmation\": \"1234\"\n}"
},
{
"id": "1d67ccad-486c-deb7-d08e-ae4912be3197",
"headers": "",
"url": "http://{{url}}:3000/partners",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "tests[\"Status code is 200\"] = responseCode.code === 200;\n\n\nconst contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");\ntests[\"Has Content-Type\"] = contentTypeHeaderExists;\n\nif (contentTypeHeaderExists) {\n tests[\"Content-Type is application/json\"] = responseHeaders[\"Content-Type\"].includes(\"application/json\");\n}\n\nconst data = JSON.parse(responseBody);\nif (data[0].id) {\n tests[\"Response body contains JSON value\"] = true;\n} else {\n tests[\"Response body contains JSON value\"] = false;\n}\n\n\n",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1445821263029,
"name": "/partners",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": []
},
{
"id": "3e89903a-e620-c96d-9a25-91507ac899ea",
"headers": "",
"url": "http://{{url}}:3000/partners/{{partnerId}}",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "tests[\"Get a partner\"] = responseCode.code === 200;\n\nconst schema = {\n \"type\": \"object\",\n \"properties\": {\n \"id\": \"string\",\n \"name\": \"string\",\n \"contactPerson\": \"string\",\n \"email\": \"string\",\n \"phoneNumber\": \"string\",\n \"color\": \"string\",\n \"status\": \"string\",\n \"note\": \"string\",\n \"cas\": \"string\"\n },\n \"required\": [\"id\", \"name\", \"contactPerson\", \"email\", \"phoneNumber\", \"color\", \"status\", \"note\", \"cas\"]\n};\n \nconst data = JSON.parse(responseBody);\n \nconst result = tv4.validateResult(data, schema);\n \ntests[\"Valid schema\"] = result.valid;",
"currentHelper": "normal",
"helperAttributes": "{}",
"time": 1445882845683,
"name": "/partners/:id",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": [],
"rawModeData": null,
"descriptionFormat": null,
"folder": "a2dee352-460a-12d6-af39-e5ace81ca337"
},
{
"id": "7106b6d8-4f5b-8176-ddd6-8c2e1d48375e",
"headers": "",
"url": "http://{{url}}:3000/partners/451a7f20-7a68-11e5-ad8d-c977700b6102",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1445821616731,
"name": "/partners/:id",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": []
},
{
"id": "9d207270-f75a-0427-b6cf-28166fbf4919",
"headers": "",
"url": "http://{{url}}:3000/partners",
"preRequestScript": "",
"pathVariables": {},
"method": "PUT",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1445816779160,
"name": "/partners",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": [],
"rawModeData": "{\n \"name\": \"Partner 1\",\n \"contactPerson\": \"Martin Micunda\",\n \"email\": \"[email protected]\",\n \"phoneNumber\": \"08908786767\",\n \"color\": \"#FF9933\",\n \"note\": \"\",\n \"id\": \"114dd450-7b33-11e5-a4f0-6f132731b1cc\",\n \"cas\": 1445789556425556000\n}"
},
{
"id": "9d904023-4c63-f62f-b735-7a80d567fdf5",
"headers": "",
"url": "http://{{url}}:3000/partners/{{partnerId}}",
"preRequestScript": "",
"pathVariables": {},
"method": "DELETE",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "tests[\"Delete a partner\"] = responseCode.code === 204;\n",
"currentHelper": "normal",
"helperAttributes": "{}",
"time": 1445879872409,
"name": "/partners/:id ",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": [],
"rawModeData": null,
"descriptionFormat": null,
"folder": "a2dee352-460a-12d6-af39-e5ace81ca337"
},
{
"id": "a7477494-bd9d-8788-a09a-4375267596d5",
"headers": "Authorization: Basic dGVzdDpzZWNyZXQ=\nContent-Type: application/json\n",
"url": "http://192.168.33.20:3000/auth/signout",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1427209045554,
"name": "/auth/signout",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": []
},
{
"id": "b55979aa-f4f0-0098-14b3-d714e8490089",
"headers": "Content-Type: application/json\n",
"url": "http://{{url}}:3000/partners",
"preRequestScript": "",
"pathVariables": {},
"method": "PUT",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "tests[\"Update a partner\"] = responseCode.code === 200;\n\nconst contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");\ntests[\"Has Content-Type\"] = contentTypeHeaderExists;\n\nif (contentTypeHeaderExists) {\n tests[\"Content-Type is application/json\"] = responseHeaders[\"Content-Type\"].includes(\"application/json\");\n}\n\nconst data = JSON.parse(responseBody);\ntests[\"Body contains cas\"] = responseBody.has(data.cas); ",
"currentHelper": "normal",
"helperAttributes": "{}",
"time": 1445879929554,
"name": "/partners",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": [],
"descriptionFormat": null,
"folder": "a2dee352-460a-12d6-af39-e5ace81ca337",
"rawModeData": "{\n \"name\": \"Partner XY\",\n \"contactPerson\": \"Martin Micunda\",\n \"email\": \"[email protected]\",\n \"phoneNumber\": \"(01483) 20670\",\n \"color\": \"#ff5b57\",\n \"status\": \"active\",\n \"note\": \"Lorem Ipsum is simply dummy text of the printing and typesetting industry.\",\n \"id\": \"{{partnerId}}\",\n \"cas\": \"{{partnerCas}}\"\n}"
},
{
"id": "b79cb081-4ff1-701d-3074-a8b0a8f47f40",
"headers": "",
"url": "http://{{url}}:3000/partners",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "tests[\"Get a list of partners\"] = responseCode.code === 200;\n\n\nconst contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");\ntests[\"Has Content-Type\"] = contentTypeHeaderExists;\n\nif (contentTypeHeaderExists) {\n tests[\"Content-Type is application/json\"] = responseHeaders[\"Content-Type\"].includes(\"application/json\");\n}\n\nconst data = JSON.parse(responseBody);\nif (data[0].id) {\n tests[\"Response body contains JSON value\"] = true;\n} else {\n tests[\"Response body contains JSON value\"] = false;\n}\n\n\n",
"currentHelper": "normal",
"helperAttributes": "{}",
"time": 1445882313830,
"name": "/partners",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": [],
"rawModeData": null,
"descriptionFormat": null,
"folder": "a2dee352-460a-12d6-af39-e5ace81ca337"
},
{
"id": "db93abe5-b6ce-0fce-50cf-574b1a75744a",
"headers": "",
"url": "http://{{url}}:3000/partners/d26ccff0-113a-11e5-ae59-1902c7e3cd63",
"preRequestScript": "",
"pathVariables": {},
"method": "DELETE",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1445816725017,
"name": "/partners/:id ",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": []
},
{
"id": "dda72c39-d379-0028-3b5e-366fce077ffb",
"headers": "",
"url": "http://{{url}}:3000/partners",
"preRequestScript": "",
"pathVariables": {},
"method": "POST",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "tests[\"Create a partner\"] = responseCode.code === 201;\n\nconst contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");\ntests[\"Has Content-Type\"] = contentTypeHeaderExists;\n\nif (contentTypeHeaderExists) {\n tests[\"Content-Type is application/json\"] = responseHeaders[\"Content-Type\"].includes(\"application/json\");\n}\n\nvar data = JSON.parse(responseBody);\n \nif (data.id) {\n tests[\"partner id found\"] = true;\n \n postman.setEnvironmentVariable(\"partnerId\", data.id);\n}\nelse {\n tests[\"partner id found\"] = false;\n}",
"currentHelper": "normal",
"helperAttributes": "{}",
"time": 1445877667330,
"name": "/partners",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": [],
"descriptionFormat": null,
"folder": null,
"rawModeData": "{\n \"name\": \"Partner XY\",\n \"contactPerson\": \"Martin Micunda\",\n \"email\": \"[email protected]\",\n \"phoneNumber\": \"(01483) 20670\",\n \"color\": \"#ff5b57\",\n \"status\": \"active\",\n \"note\": \"Lorem Ipsum is simply dummy text of the printing and typesetting industry.\"\n}"
},
{
"id": "f3b3aad6-2eff-1a92-63aa-565b1885fee8",
"headers": "Content-Type: application/json\n",
"url": "http://{{url}}:3000/partners",
"preRequestScript": "",
"pathVariables": {},
"method": "POST",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "tests[\"Create a partner\"] = responseCode.code === 201;\n\nconst contentTypeHeaderExists = responseHeaders.hasOwnProperty(\"Content-Type\");\ntests[\"Has Content-Type\"] = contentTypeHeaderExists;\n\nif (contentTypeHeaderExists) {\n tests[\"Content-Type is application/json\"] = responseHeaders[\"Content-Type\"].includes(\"application/json\");\n}\n\nconst data = JSON.parse(responseBody);\n \nif (data.id) {\n tests[\"Body contains id\"] = true;\n \n postman.setEnvironmentVariable(\"partnerId\", data.id);\n} else {\n tests[\"Body contains id\"] = false;\n}\n\nif (data.cas) {\n tests[\"Body contains cas\"] = true;\n \n postman.setEnvironmentVariable(\"partnerCas\", data.cas);\n} else {\n tests[\"Body contains cas\"] = false;\n}",
"currentHelper": "normal",
"helperAttributes": "{}",
"time": 1445882882464,
"name": "/partners ",
"description": "",
"collectionId": "fee7e558-956a-431c-5b45-cadbb36d6fdc",
"responses": [],
"descriptionFormat": null,
"folder": "a2dee352-460a-12d6-af39-e5ace81ca337",
"rawModeData": "{\n \"name\": \"Partner XY\",\n \"contactPerson\": \"Martin Micunda\",\n \"email\": \"[email protected]\",\n \"phoneNumber\": \"(01483) 20670\",\n \"color\": \"#ff5b57\",\n \"status\": \"active\",\n \"note\": \"Lorem Ipsum is simply dummy text of the printing and typesetting industry.\"\n}"
}
]
}