-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCheck IN.postman_collection.json
589 lines (589 loc) · 14.1 KB
/
Check IN.postman_collection.json
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
{
"info": {
"_postman_id": "fbccaf5c-ca1e-4675-8443-2cda0fb0b6e8",
"name": "Check IN",
"description": "# 📄 Get started here\n\nThis template contains a boilerplate for documentation that you can quickly customize and reuse.\n\n## 🔖 How to use this template\n\n- Replace the content given brackets (()) with your API's details.\n- Tips are formatted in `codespan` - feel free to read and remove them.\n \n\n---\n\n`Start with a brief overview of what your API offers.`\n\nThe ((product name)) provides many API products, tools, and resources that enable you to ((add product value here)).\n\n`You can also list the APIs you offer, link to the relevant pages, or do both in this section.`\n\n## **Getting started guide**\n\n`List the steps or points required to start using your APIs. Make sure to cover everything required to reach success with your API as quickly as possible.`\n\nTo start using the ((add APIs here)), you need to -\n\n`The points given below are from The Postman API's documentation. You can reference it to write your own getting started guide.`\n\n- You must use a valid API Key to send requests to the API endpoints. You can get your API key from Postman's [integrations dashboard](https://go.postman.co/settings/me/api-keys).\n- The API has [rate and usage limits](https://learning.postman.com/docs/developer/postman-api/postman-api-rate-limits/).\n- The API only responds to HTTPS-secured communications. Any requests sent via HTTP return an HTTP 301 redirect to the corresponding HTTPS resources.\n- The API returns request responses in JSON format. When an API request returns an error, it is sent in the JSON response as an error key.\n \n\n## Authentication\n\n`Add details on the authorization keys/tokens required, steps that cover how to get them, and the relevant error codes.`\n\nThe ((product name)) API uses ((add your API's authorization type)) for authentication.\n\n`The details given below are from the Postman API's documentation. You can reference it to write your own authentication section.`\n\nPostman uses API keys for authentication. You can generate a Postman API key in the [API keys](https://postman.postman.co/settings/me/api-keys) section of your Postman account settings.\n\nYou must include an API key in each request to the Postman API with the X-Api-Key request header.\n\n### Authentication error response\n\nIf an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.\n\n## Rate and usage limits\n\n`Use this section to cover your APIs' terms of use. Include API limits, constraints, and relevant error codes, so consumers understand the permitted API usage and practices.`\n\n`The example given below is from The Postman API's documentation. Use it as a reference to write your APIs' terms of use.`\n\nAPI access rate limits apply at a per-API key basis in unit time. The limit is 300 requests per minute. Also, depending on your plan, you may have usage limits. If you exceed either limit, your request will return an HTTP 429 Too Many Requests status code.\n\nEach API response returns the following set of headers to help you identify your use status:\n\n| Header | Description |\n| --- | --- |\n| `X-RateLimit-Limit` | The maximum number of requests that the consumer is permitted to make per minute. |\n| `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window. |\n| `X-RateLimit-Reset` | The time at which the current rate limit window resets in UTC epoch seconds. |\n\n### 503 response\n\nAn HTTP `503` response from our servers indicates there is an unexpected spike in API access traffic. The server is usually operational within the next five minutes. If the outage persists or you receive any other form of an HTTP `5XX` error, [contact support](https://support.postman.com/hc/en-us/requests/new/).\n\n### **Need some help?**\n\n`Add links that customers can refer to whenever they need help.`\n\nIn case you have questions, go through our tutorials ((link to your video or help documentation here)). Or visit our FAQ page ((link to the relevant page)).\n\nOr you can check out our community forum, there’s a good chance our community has an answer for you. Visit our developer forum ((link to developer forum)) to review topics, ask questions, and learn from others.\n\n`You can also document or add links to libraries, code examples, and other resources needed to make a request.`",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "38646384"
},
"item": [
{
"name": "Sign Up",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"username\": \"john_doe\",\n \"email\": \"[email protected]\",\n \"password\": \"pass@123\",\n \"password2\": \"pass@123\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"employee_type\": \"staff\",\n \"phone_no\": \"1234512345\",\n \"hire_date\":\"2023-12-12\"\n}"
},
"url": {
"raw": "{{server}}/auth/signup/",
"host": [
"{{server}}"
],
"path": [
"auth",
"signup",
""
]
}
},
"response": []
},
{
"name": "Sign In",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"username\": \"john_doe\",\n \"password\": \"pass@123\"\n}"
},
"url": {
"raw": "{{server}}/auth/signin/",
"host": [
"{{server}}"
],
"path": [
"auth",
"signin",
""
]
}
},
"response": []
},
{
"name": "Sign Out",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"url": {
"raw": "{{server}}/signout/",
"host": [
"{{server}}"
],
"path": [
"signout",
""
]
}
},
"response": []
},
{
"name": "Get User Profile",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"url": {
"raw": "{{server}}/auth/profile/",
"host": [
"{{server}}"
],
"path": [
"auth",
"profile",
""
]
}
},
"response": []
},
{
"name": "Update User Profile",
"request": {
"method": "PUT",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"first_name\": \"Johnathan\",\n \"last_name\": \"Doe\"\n}"
},
"url": {
"raw": "{{server}}/auth/profile/update/",
"host": [
"{{server}}"
],
"path": [
"auth",
"profile",
"update",
""
]
}
},
"response": []
},
{
"name": "List Staff",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"url": {
"raw": "{{server}}/auth/staff/",
"host": [
"{{server}}"
],
"path": [
"auth",
"staff",
""
]
}
},
"response": []
},
{
"name": "Submit Cleaning Report",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"room_number\": \"101\",\n \"notes\": \"Everything looks good\",\n \"reported_issues\": \"No issues\"\n}"
},
"url": {
"raw": "{{server}}/api/submit-cleaning-report/",
"host": [
"{{server}}"
],
"path": [
"api",
"submit-cleaning-report",
""
]
}
},
"response": []
},
{
"name": "Room Cleaning History",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"url": {
"raw": "{{server}}/api/room-cleaning-history/14/",
"host": [
"{{server}}"
],
"path": [
"api",
"room-cleaning-history",
"14",
""
]
}
},
"response": []
},
{
"name": "Create Room",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "room_number",
"value": "101",
"type": "text"
},
{
"key": "employee",
"value": "1",
"type": "text"
},
{
"key": "room_image",
"type": "file",
"src": "/path/to/image.jpg"
}
]
},
"url": {
"raw": "{{server}}/createroom/",
"host": [
"{{server}}"
],
"path": [
"createroom",
""
]
}
},
"response": []
},
{
"name": "Update Room",
"request": {
"method": "PUT",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "room_image",
"type": "file",
"src": "/path/to/image.jpg"
}
]
},
"url": {
"raw": "{{server}}/api/updateroom/101/",
"host": [
"{{server}}"
],
"path": [
"api",
"updateroom",
"101",
""
]
}
},
"response": []
},
{
"name": "Dashboard Stats",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"url": {
"raw": "{{server}}/api/dashboardstats/",
"host": [
"{{server}}"
],
"path": [
"api",
"dashboardstats",
""
]
}
},
"response": []
},
{
"name": "Inventory Check",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "image",
"type": "file",
"src": "/path/to/image.jpg"
},
{
"key": "room_number",
"value": "101",
"type": "text"
},
{
"key": "status",
"value": "clean",
"type": "text"
}
]
},
"url": {
"raw": "{{server}}/inventory_check/",
"host": [
"{{server}}"
],
"path": [
"inventory_check",
""
]
}
},
"response": []
},
{
"name": "Get All Room Data",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"url": {
"raw": "{{server}}/api/get-all-rooms/",
"host": [
"{{server}}"
],
"path": [
"api",
"get-all-rooms",
""
]
}
},
"response": []
},
{
"name": "Get Room Data Copy",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"url": {
"raw": "{{server}}/api/room/2/",
"host": [
"{{server}}"
],
"path": [
"api",
"room",
"2",
""
]
}
},
"response": []
},
{
"name": "Employee Performance Graphs",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var template = `\r",
"<canvas id=\"myChart\" height=\"75\"></canvas>\r",
"`;\r",
"\r",
"function constructVisualizerPayload() {\r",
" var graphData = pm.response.json();\r",
" return {response: graphData};\r",
"}\r",
"\r",
"pm.visualizer.set(template, constructVisualizerPayload());"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"url": {
"raw": "{{server}}/api/employeeperformancegraphs/2/",
"host": [
"{{server}}"
],
"path": [
"api",
"employeeperformancegraphs",
"2",
""
]
}
},
"response": []
},
{
"name": "Admin Dashboard",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
}
],
"url": {
"raw": "{{server}}/api/admin/dashboard-stats/",
"host": [
"{{server}}"
],
"path": [
"api",
"admin",
"dashboard-stats",
""
]
}
},
"response": []
},
{
"name": "Archive Old Logs",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Token {{token}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"days\": 60\n}"
},
"url": {
"raw": "{{server}}/archive_old_logs/",
"host": [
"{{server}}"
],
"path": [
"archive_old_logs",
""
]
}
},
"response": []
},
{
"name": "Get News",
"request": {
"method": "GET",
"url": {
"raw": "http://localhost:8000/api/news",
"host": ["localhost"],
"port": "8000",
"path": ["api","news"]
}
}
},
{
"name": "Get Reviews",
"request": {
"method": "GET",
"url": {
"raw": "http://localhost:8000/api/reviews",
"host": ["localhost"],
"port": "8000",
"path": ["api","reviews"]
}
}
}
],
"auth": {
"type": "apikey",
"apikey": [
{
"key": "key",
"value": "X-API-Key",
"type": "string"
},
{
"key": "value",
"value": "{{token}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "baseUrl",
"value": "https://farming-simulator.pstmn.io"
}
]
}