-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAPTRS.postman_collection.json
2785 lines (2785 loc) · 113 KB
/
APTRS.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
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"info": {
"_postman_id": "131e5e02-32e5-45be-9c15-02c91fe9230a",
"name": "APTRS",
"description": "APTRS (Automated Penetration Testing Reporting System) is a Python and Django-based automated reporting tool designed for penetration testers and security organizations. This tool streamlines the report generation process by enabling users to create PDF and Excel reports directly, eliminating the need for manual approaches. Additionally, APTRS offers a systematic way to monitor and manage vulnerabilities within various projects. Keep your penetration testing projects organized and efficient with APTRS.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "24236036",
"_collection_link": "https://www.postman.com/aptrs-api/workspace/aptrs-workspace/collection/24236036-131e5e02-32e5-45be-9c15-02c91fe9230a?action=share&source=collection_link&creator=24236036"
},
"item": [
{
"name": "Account",
"item": [
{
"name": "Admin",
"item": [
{
"name": "Get User",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/auth/user/1",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"user",
"1"
]
}
},
"response": []
},
{
"name": "Add User",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"full_name\": \"normal user\", \r\n \"username\": \"normaluser\",\r\n \"email\": \"[email protected]\",\r\n \"is_active\":false,\r\n \"number\":\"+911622445522\",\r\n \"is_superuser\": false,\r\n \"position\":\"Security Engineer\", // text field\r\n \"password\": \"Admin@12345\",\r\n \"groups\":[\r\n \"Manangers\" // Multiple Groups can be selected\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/adduser",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"adduser"
]
},
"description": "### Endpoint Description: Add New User (Admin Only API)\n\nThis API endpoint allows you to add a new user to the system. It is an HTTP POST request to the `{{domainname}}/api/auth/adduser` URL.\n\n#### Request Method\n\n- **Method:** POST\n- **Endpoint:** `{{domainname}}/api/auth/adduser`\n \n\n#### Request Parameters\n\n``` json\n{\n \"first_name\": \"user1\",\n \"last_name\": \"user1\",\n \"company\": \"helloworld\",\n \"number\":\"+911123334567\",\n \"is_superuser\": false,\n \"is_active\": true,\n \"username\": \"user1\",\n \"email\": \"[email protected]\",\n \"password\": \"user1\"\n}\n\n ```\n\n- `username` (string): The username of the new user.\n- `email` (string): The email address of the new user.\n- `first_name` (string): The first name of the new user.\n- `last_name` (string): The last name of the new user.\n- `is_superuser` (boolean): Indicates whether the new user is a superuser or not.\n- `is_active` (boolean): Indicates whether the new user is active or not.\n- `number` (string): The contact number of the new user.\n- `company` (string): The company name of the new user.\n- `username` (string): The unique username of the new user.\n \n\n#### Note\n\nThe API is only for Admin User\n\n#### Example Response\n\nThe response to this request will have a status code of 200 if the user was successfully added. The response body will include the following parameters:\n\n``` json\n{\n \"id\": 5,\n \"username\": \"1user1\",\n \"email\": \"[email protected]\",\n \"first_name\": \"user1\",\n \"last_name\": \"user1\",\n \"is_superuser\": false,\n \"is_active\": true,\n \"profile\": {\n \"id\": 4,\n \"profilepic\": \"http://aptrsapi.souravkalal.tech/media/profile/avatar-1.svg\",\n \"number\": \"+911613334567\",\n \"company\": \"AnoF PVT LTD\",\n \"user\": 5\n },\n \"message\": \"User object created successfully.\",\n \"status\": \"true\"\n}\n```\n\n- `id` (integer): The ID of the newly created user.\n- `username` (string): The username of the newly created user.\n- `email` (string): The email address of the newly created user.\n- `first_name` (string): The first name of the newly created user.\n- `last_name` (string): The last name of the newly created user.\n- `is_superuser` (boolean): Indicates whether the newly created user is a superuser or not.\n- `is_active` (boolean): Indicates whether the newly created user is active or not.\n- `profile` (object): An object containing additional profile information for the newly created user.\n - `id` (integer): The ID of the profile.\n - `profilepic` (string): The profile picture of the newly created user.\n - `number` (string): The contact number of the newly created user.\n - `company` (string): The company name of the newly created user.\n- `message` (string): A message indicating the status of the request.\n- `status` (string): The status of the request.\n \n\nPlease note that the values provided in the response example are placeholders and may not reflect the actual values returned by the API.\n\nThe response will have a status code of 400 if there are any errors in the request. The response body will provide details about the errors, including specific error messages for each parameter.\n\nFor example, if the `username` and `email` parameters are missing or empty, the response will be:\n\n``` json\n{\n \"username\": [\"This field is required.\"],\n \"email\": [\"This field is required.\"]\n}\n\n ```"
},
"response": []
},
{
"name": "Edit User",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"full_name\": \"Sourav Kalal\",\r\n \"username\": \"admin\",\r\n \"email\": \"[email protected]\",\r\n \"is_active\":true,\r\n \"number\":\"+911122445522\",\r\n \"is_superuser\": false,\r\n \"position\":\"Security Engineer\",\r\n \"password\": \"admin\", // Optional\r\n \"groups\":[\r\n \"User Level Group\" // Multiple Groups can be selected\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/edituser/73",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"edituser",
"73"
]
}
},
"response": []
},
{
"name": "Delete User",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "[\r\n 73\r\n]",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/deleteuser",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"deleteuser"
]
}
},
"response": []
},
{
"name": "Create Permission Group",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"Manager Groups\",\r\n \"description\": \"Permission for Managers\",\r\n \"list_of_permissions\": [ //multiple permissions can be selected\r\n \"Change Password\",\r\n \"Create Project\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/groups/create/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"groups",
"create",
""
]
}
},
"response": []
},
{
"name": "Edit Permission Group",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"Managers\",\r\n \"description\": \"Permission for Managers\",\r\n \"list_of_permissions\": [\r\n \"Change Password\",\r\n \"Create Project\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/groups/update/4/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"groups",
"update",
"4",
""
]
}
},
"response": []
},
{
"name": "Delete Group",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "[\r\n 10,\r\n 11,\r\n 12\r\n]",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/groups/delete",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"groups",
"delete"
]
}
},
"response": []
},
{
"name": "List Available Permissions",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/auth/list/permission/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"list",
"permission",
""
]
}
},
"response": []
},
{
"name": "List All Permission Group",
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"connection": true
}
},
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/auth/groups/list/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"groups",
"list",
""
]
}
},
"response": []
}
],
"description": "Admin APIs of APTRS"
},
{
"name": "Login",
"event": [
{
"listen": "test",
"script": {
"exec": [
"const jsonData = pm.response.json();\r",
"const accessToken = jsonData.access;\r",
"const refreshToken = jsonData.refresh;\r",
"\r",
"pm.collectionVariables.set(\"JWT\", accessToken);\r",
"pm.collectionVariables.set(\"refreshToken\", refreshToken);"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\"email\":\"[email protected]\",\"password\":\"I-am-Weak-Password-Please-Change-Me\"}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/login/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"login",
""
]
},
"description": "### Endpoint Description: User Authentication\n\n#### Endpoint\n\nThis API endpoint is used to authenticate a user and obtain access and refresh tokens for further API calls. Send a POST request to `{{domainname}}/api/auth/login/` with the required credentials.\n\n#### Request Method\n\n- **Method:** POST\n- **Endpoint:** `{{domainname}}/api/auth/login/`\n \n\n#### Request Body\n\n``` json\n{\n\"email\": \"[email protected]\",\n\"password\": \"admin\"\n}\n\n ```\n\n### Response\n\nThe response will include the following information:\n\n``` json\n{\n\"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTcwMzg2Mzc5NSwiaWF0IjoxNzAyNTY3Nzk1LCJqdGkiOiJhOGE0Y2I5MTZjMTk0ZmUyYmY3NWUxN2I5MDQxZmQ4NSIsInVzZXJfaWQiOjd9.elLzk-U5A_xqte3V2HfrzPkExeJaUX1Xj5WdVJWb_24\",\n\"access\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzA1MTU5Nzk1LCJpYXQiOjE3MDI1Njc3OTUsImp0aSI6IjJkYTgyMTdhODc1YjQ0M2U4NjE2ZWI2NjY3ZWY5MWMzIiwidXNlcl9pZCI6N30.C4kOCx0B4FDrVAEvHreAnv9R7nQ5gSH33FLeWpUKSsU\",\n\"Status\": \"True\",\n\"username\": \"admin\",\n\"Pic\": \"/media/profile/avatar-1.svg\",\n\"isAdmin\": true,\n\"permissions\": [\n\"Create Project\",\n\"Delete Images\",\n\"Add Retest for Projects\",\n\"Change Password\",\n....\n]\n}\n\n ```\n\n- `refresh`: A refresh token that can be used to obtain a new access token when it expires.\n- `access`: An access token that should be included in the headers of subsequent requests to authorize the user.\n- `Status`: The status of the authentication process.\n- `username`: The username of the authenticated user.\n- `Pic`: The profile picture of the authenticated user.\n- `isAdmin`: A boolean value indicating whether the authenticated user has admin privileges.\n- permissions - List of permissions users have. Each user could have different sets of permissions.\n \n\n> _**NOTE:**_ Admin user is not restricted with permission. The admin user is not part of the permission group and has all access irrespective of what permissions are assigned."
},
"response": []
},
{
"name": "Refresh Token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"const jsonData = pm.response.json();\r",
"const accessToken = jsonData.access;\r",
"const refreshToken = jsonData.refresh;\r",
"\r",
"pm.collectionVariables.set(\"JWT\", accessToken);\r",
"pm.collectionVariables.set(\"refreshToken\", refreshToken);"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"refresh\": \"{{refreshToken}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/token/refresh/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"token",
"refresh",
""
]
},
"description": "### Endpoint Description: User Refresh Token\n\n#### Endpoint\n\nThis endpoint allows the user to refresh the access token. Send a POST request to `{{domainname}}/api/auth/token/refresh/` with the required credentials.\n\n\n\n#### Request Method\n\n- **Method:** POST\n- **Endpoint:** `{{domainname}}/api/auth/token/refresh/`\n\n\n#### Request Body\n\n``` json\n{\n\"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTcwMzQxMjYxNCwiaWF0IjoxNzAyMTE2NjE0LCJqdGkiOiJlNzQyZDFjMTQxZWI0OGQwYjlkOTg5NzViZWE1OGM3ZCIsInVzZXJfaWQiOjF9.MKSr0X-x2m6HZoZUQ4qBhOZVPUiBoC9vP8z9c4-91zw\"\n}\n\n```\n\n### Response\n\nThe response will include the following information:\n\n``` json\n{\n\"access\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzA1MTYwMjgyLCJpYXQiOjE3MDIxMTY2MTQsImp0aSI6IjZjY2I4YTY1MmYzNjRkN2Q4NzIxOWVmZGE2NTdiYzUwIiwidXNlcl9pZCI6MX0.UI-4vmDQYIPs1YObzxmeXh-QgqqFSkxGkRDAAwZWbwE\",\n\"refresh\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTcwMzg2NDI4MiwiaWF0IjoxNzAyNTY4MjgyLCJqdGkiOiIyOGViZWQ2OGZlYmE0YjZmYjg5ODM5ZjVhMmFkZDczYiIsInVzZXJfaWQiOjF9.LrYKjte1KUszcEq7Bd5742BUzP3ECT7S659GEqn-uzE\"\n}\n\n```\n\n- `refresh`: An updated refresh token that can be used to obtain a new access token when it expires.\n- `access`: An updated access token that should be included in the headers of subsequent requests to authorize the user.\n"
},
"response": []
},
{
"name": "Get All User",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/auth/users",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"users"
]
},
"description": "### Endpoint Description: Retrieve All Users\n\n#### Endpoint\n\nThis API endpoint allows you to retrieve a list of users from the server. Send a POST request to `{{domainname}}/api/auth/users` with the required credentials.\n\n\n\n#### Request Method\n\n- **Method:** GET\n- **Endpoint:** `{{domainname}}/api/auth/users`\n\n\n\n### Response\n\nThe response will include the following information:\n\n``` json\n[\n{\n\"id\": 1,\n\"username\": \"sourav\",\n\"full_name\": \"Sourav Kalal\",\n\"email\": \"[email protected]\",\n\"is_staff\": true,\n\"is_active\": true,\n\"is_superuser\": true,\n\"profilepic\": \"/media/profile/avatar-1.svg\",\n\"number\": \"+911122345522\",\n\"company\": \"AnoF PVT LTD\",\n\"position\": \"Security Engineer\",\n\"groups\": [\n\"User Permission Group\",\n\"Manager Permission Group\"\n]\n},\n{\n\"id\": 7,\n\"username\": \"admin\",\n\"full_name\": \"Sourav Kalal\",\n\"email\": \"[email protected]\",\n\"is_staff\": true,\n\"is_active\": true,\n\"is_superuser\": true,\n\"profilepic\": \"/media/profile/avatar-1.svg\",\n\"number\": \"+911122445522\",\n\"company\": \"AnoF PVT LTD\",\n\"position\": \"Security Engineer\",\n\"groups\": [\n\"User Permission Group\"\n]\n}\n]\n\n```\n\n"
},
"response": []
},
{
"name": "Get All User Filter",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/auth/users/filter?username=&full_name=&email=&position=&is_active=&limit=5&offset=0&sort=full_name&order_by=desc",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"users",
"filter"
],
"query": [
{
"key": "username",
"value": ""
},
{
"key": "full_name",
"value": ""
},
{
"key": "email",
"value": ""
},
{
"key": "position",
"value": ""
},
{
"key": "is_active",
"value": ""
},
{
"key": "limit",
"value": "5",
"description": "upto 50"
},
{
"key": "offset",
"value": "0"
},
{
"key": "sort",
"value": "full_name"
},
{
"key": "order_by",
"value": "desc"
}
]
}
},
"response": []
},
{
"name": "Profile",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/auth/myprofile",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"myprofile"
]
},
"description": "This API endpoint allows users to retrieve their own profile information. It is an HTTP GET request to `{{domainname}}/api/auth/myprofile`.\n\n### Request\n\nThe request does not require any parameters or headers. This request allows users to retrieve their own profile information.\n\n### Response\n\nThe response will have a status code of 200 if the request is successful. The response body will contain the following information:\n\n``` json\n{\n \"id\": 1,\n \"username\": \"admin\",\n \"email\": \"[email protected]\",\n \"first_name\": \"Sourav\",\n \"last_name\": \"Kalal\",\n \"is_superuser\": true,\n \"profile\": {\n \"id\": 1,\n \"profilepic\": \"/media/profile/avatar-1.svg\",\n \"number\": \"+911234564674\",\n \"company\": \"Example Inc.\",\n \"user\": 1\n }\n}\n\n ```\n\n- `id` (integer): The unique identifier of the user.\n- `username` (string): The username of the user.\n- `email` (string): The email address of the user.\n- `first_name` (string): The first name of the user.\n- `last_name` (string): The last name of the user.\n- `is_superuser` (boolean): Indicates whether the user has superuser privileges.\n- `profile` (object): An object containing additional profile information.\n - `id` (integer): The unique identifier of the profile.\n - `profilepic` (string): The URL of the user's profile picture.\n - `number` (string): The contact number of the user.\n - `company` (string): The name of the company associated with the user.\n - `user` (integer): The ID of the user associated with the profile.\n\nPlease note that the response may contain empty or default values for some fields if the user has not provided the information."
},
"response": []
},
{
"name": "Edit Profile",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "username",
"value": "admin",
"type": "text"
},
{
"key": "email",
"value": "[email protected]",
"description": "// read only cannot be edited",
"type": "text",
"disabled": true
},
{
"key": "full_name",
"value": "user person",
"type": "text"
},
{
"key": "profilepic",
"description": "Optional",
"type": "file",
"src": "/C:/Users/AnoF/Downloads/doc.png",
"disabled": true
},
{
"key": "number",
"value": "+911234567891",
"type": "text"
},
{
"key": "company",
"value": "test",
"type": "text",
"disabled": true
},
{
"key": "is_superuser",
"value": "true",
"type": "text",
"disabled": true
}
]
},
"url": {
"raw": "{{domainname}}/api/auth/editprofile",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"editprofile"
]
},
"description": "### Endpoint Description: Edit User Profile\n\n#### Endpoint\n\nThis API endpoint allows users to edit their profile information. It is an HTTP POST request that should be sent to `{{domainname}}/api/auth/editprofile`.\n\n#### Request Method\n\n- **Method:** POST\n- **Endpoint:** `{{domainname}}/api/auth/editprofile`\n \n\n#### Request Parameters\n\n- `id` (integer): The unique identifier of the user.\n- `username` (string): The username of the user.\n- `email` (string): The email address of the user.\n- `first_name` (string): The first name of the user.\n- `last_name` (string): The last name of the user.\n- `is_superuser` (boolean): Indicates whether the user is a superuser or not.\n- `profile` (object): An object containing additional profile information.\n - `id` (integer): The unique identifier of the profile.\n - `profilepic` (string): The URL of the user's profile picture.\n - `number` (string): The contact number of the user.\n - `company` (string): The company name of the user.\n - `user` (integer): The user ID associated with the profile.\n\n#### Note\n\nPlease send this request using form data, not JSON. Additionally, ensure to include the necessary information to update the desired profile fields.\n\n#### Response\n\nThe response to this request will have a status code of `200`, indicating a successful operation. The response body will contain the updated profile information of the user.\n\n#### Example Response\n\n``` json\n{\n \"id\": 1,\n \"username\": \"admin\",\n \"email\": \"[email protected]\",\n \"first_name\": \"sourav11\",\n \"last_name\": \"kalal\",\n \"is_superuser\": true,\n \"profile\": {\n \"id\": 1,\n \"profilepic\": \"http://aptrsapi.souravkalal.tech/media/profile/avatar-1.svg\",\n \"number\": \"+911234567891\",\n \"company\": \"AnoF PVT LTD\",\n \"user\": 1\n }\n}\n\n ```"
},
"response": []
},
{
"name": "Change Password",
"event": [
{
"listen": "test",
"script": {
"exec": [
"// Test for successful response\r",
"pm.test(\"Response status code is 200\", function() {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"// Test for the presence of a success message in the response\r",
"pm.test(\"Response contains a success message\", function() {\r",
" var jsonData = pm.response.json();\r",
" pm.expect(jsonData.message).to.exist.and.to.be.a('string').and.to.not.be.empty;\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"newpassword\": \"PE#5GZ29PTZMSE\",\r\n \"oldpassword\": \"PE#5GZ29PTZMSE\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/changepassword",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"changepassword"
]
},
"description": "### Endpoint Description: Change Password\n\nThis API endpoint is used to change the password of a user. It is an HTTP POST request that should be sent to `{{domainname}}/api/auth/changepassword`.\n\n#### Request Method\n\n- **Method:** POST\n- **Endpoint:** `{{domainname}}/api/auth/changepassword`\n \n\n#### Request Parameters\n\n- `old_password` (string): The current password of the user.\n- `new_password` (string): The new password to be set.\n \n\n``` json\n{\n \"newpassword\": \"admin\",\n \"oldpassword\": \"admin\"\n}\n\n ```\n\n### Response\n\nIn case of a successful password change, the API will return a response with a status code of `200` and a message in the following format:\n\n``` json\n{\n \"message\": \"Password updated.\"\n}\n\n ```\n\nIf there is an error in the request, the API will respond with a status code of `400` and an error message in the following format:\n\n``` json\n{\n \"non_field_errors\": [\"\"]\n}\n\n ```\n\nPlease note that the error message may contain additional information if there are specific errors related to the request parameters."
},
"response": []
},
{
"name": "Get All Active User",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/auth/users-active",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"users-active"
]
}
},
"response": []
},
{
"name": "Logout",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"refresh_token\": \"{{refreshToken}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/auth/logout/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"auth",
"logout",
""
]
}
},
"response": []
}
],
"description": "**Account APIs Overview**\n\nThe Account APIs in APTRS facilitate the seamless management of internal company user accounts. These APIs empower administrators to add, update, and edit user profiles for internal company users. Additionally, individual users have the ability to modify their own profiles, change passwords, and manage user permissions and permission groups.\n\n**Key Features of Account APIs:**\n\n1. **User Management:**\n \n - Add, update, and edit user profiles for internal company users using the Account APIs.\n \n - Ensure accurate and up-to-date information for all users within the APTRS system.\n \n2. **Self-Service Profile Modification:**\n \n - Empower individual users to edit their own profiles, providing a self-service option for maintaining personal information.\n \n3. **Password Management:**\n \n - Allow users to change their passwords through dedicated API endpoints, enhancing security and user control.\n \n4. **User Permission Control:**\n \n - Manage user permissions for each API of APTRS, controlling access for individual users.\n \n - Utilize permission groups to efficiently assign and manage access control based on specific user roles.\n \n5. **Granular Access Control:**\n \n - Implement granular access control for each user, ensuring precise control over the functionalities and features accessible to different users.\n \n\nThese APIs offer a comprehensive solution for internal company user account management, providing administrators and individual users with the tools needed to maintain accurate profiles, enhance security through password management, and control access to APTRS functionalities based on specific user roles and permissions."
},
{
"name": "Project",
"item": [
{
"name": "Project",
"item": [
{
"name": "All Project",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/project/get-projects/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"get-projects",
""
]
}
},
"response": []
},
{
"name": "Get Project with Filters and Pagination",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/project/projects/filter?name=&companyname=&projecttype=&testingtype=&owner=&status=&startdate=&enddate_before=&limit=7&offset=0&order_by=asc&sort=owner",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"projects",
"filter"
],
"query": [
{
"key": "name",
"value": ""
},
{
"key": "companyname",
"value": ""
},
{
"key": "projecttype",
"value": ""
},
{
"key": "testingtype",
"value": ""
},
{
"key": "owner",
"value": ""
},
{
"key": "status",
"value": ""
},
{
"key": "startdate",
"value": "",
"description": "full date or any number "
},
{
"key": "enddate_before",
"value": "",
"description": "full date or any number "
},
{
"key": "limit",
"value": "7"
},
{
"key": "offset",
"value": "0"
},
{
"key": "order_by",
"value": "asc",
"description": "desc/asc"
},
{
"key": "sort",
"value": "owner"
}
]
}
},
"response": []
},
{
"name": "My Projects",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/project/my-projects/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"my-projects",
""
]
}
},
"response": []
},
{
"name": "Get Project",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/project/get-project/1/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"get-project",
"1",
""
]
}
},
"response": []
},
{
"name": "New Project",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n\t\"name\": \"Juice Shop2\",\r\n\t\"description\": \"The project is about Juice Shop application security assessment. The project involves finding security vulnerabilities in the application\",\r\n\t\"projecttype\": \"Web Application Penetration Testing\",\r\n\t\"startdate\": \"2024-10-26\",\r\n\t\"enddate\": \"2024-10-31\",\r\n\t\"companyname\": \"APTRS PVT\",\r\n\t\"testingtype\": \"Black Box\",\r\n\t\"projectexception\": \"\",\r\n\t\"owner\": [\r\n\t\t\"Sourav.Kalal\"\r\n\t] // only admin user can select owner\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/project/add-project/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"add-project",
""
]
}
},
"response": []
},
{
"name": "Edit Project",
"request": {
"method": "POST",
"header": [
{
"key": "Host",
"value": "127.0.0.1:8000",
"disabled": true
},
{
"key": "Content-Length",
"value": "355",
"disabled": true
},
{
"key": "X-CSRFToken",
"value": "t5s177WKrB9G67Z5piltnC7zceuVkVh69wGRAyTnbYo6FwJ9J3KJCadckaZKyGBH",
"disabled": true
},
{
"key": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"key": "Origin",
"value": "ggg",
"disabled": true
},
{
"key": "Connection",
"value": "close",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"Juice Shop\",\r\n \"description\": \"The project is about Juice Shop application security assessment. The project involves finding security vulnerabilities in the application\",\r\n \"projecttype\": \"Web Application Penetration Testing\",\r\n \"startdate\": \"2022-10-26\",\r\n \"enddate\": \"2024-10-31\",\r\n \"testingtype\": \"Black Box\",\r\n \"projectexception\": \"\",\r\n \"companyname\": \"OWASP\",\r\n \"owner\": [\r\n \"admin\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/project/edit-project/7/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"edit-project",
"7",
""
]
}
},
"response": []
},
{
"name": "Delete Projects",
"request": {
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "[\r\n 25,\r\n 26,\r\n 27,\r\n 28,\r\n 29,\r\n 30,\r\n 31,\r\n 32,\r\n 33,\r\n 34,\r\n 35,\r\n 36,\r\n 37,\r\n 40,\r\n 41\r\n]",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/project/delete-project/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"delete-project",
""
]
}
},
"response": []
},
{
"name": "Mark Project as Completed",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/project/status/completed/1/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"status",
"completed",
"1",
""
]
}
},
"response": []
},
{
"name": "ReOepn Project",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/project/reopen/completed/1/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"reopen",
"completed",
"1",
""
]
}
},
"response": []
},
{
"name": "Update Project Owner",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"id\": 1, //project-id\r\n \"owner\": [\r\n \"Sourav.Kalal\"\r\n ]\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{domainname}}/api/project/edit-owner/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"edit-owner",
""
]
}
},
"response": []
}
],
"description": "Project APIs of APTRS"
},
{
"name": "Vulnerability",
"item": [
{
"name": "Get Project Findings",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{domainname}}/api/project/findings/1/",
"host": [
"{{domainname}}"
],
"path": [
"api",
"project",
"findings",
"1",
""
]
}
},
"response": []
},
{
"name": "Get Vulnerability",
"request": {
"method": "GET",
"header": [],
"url": {