This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cord_API_V3_Location.postman_collection.json
6294 lines (6294 loc) · 430 KB
/
Cord_API_V3_Location.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": "1890e8de-e2f0-4732-9dbd-bc787b8436b5",
"name": "Cord_API_V3_Location",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Pre-req ( Session + Register + Login + GrantPower ) for Location",
"item": [
{
"name": "Session",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var response = pm.response.json();\r",
"pm.globals.set(\"token\", response.data.session.token);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "noauth"
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "# Write your query or mutation here\r\nquery {\r\n session(browser: false) {\r\n user {\r\n id,\r\n email\r\n {\r\n value\r\n }\r\n realFirstName\r\n {\r\n value\r\n }\r\n createdAt\r\n canDelete\r\n displayLastName\r\n {\r\n value\r\n }\r\n \r\n \r\n \r\n },\r\n token\r\n }\r\n}",
"variables": ""
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Root Admin Login",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"var id = jsonData.data.login.user.id;",
"pm.globals.set(\"rootAdminUserid\", id);",
"",
"var email = jsonData.data.login.user.email.value;",
"pm.globals.set(\"email\", email);",
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation login($input: LoginInput!) {\r\n login(input: $input) {\r\n powers\r\n user {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n canDelete\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n #canDelete\r\n description {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n start\r\n end\r\n }\r\n }\r\n organizations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n partners {\r\n total\r\n hasMore\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n #canDelete\r\n start\r\n end\r\n description {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n }\r\n }\r\n organizations {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n partners {\r\n canCreate\r\n canRead\r\n hasMore\r\n total\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n canEdit\r\n canRead\r\n value {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
"variables": "{\r\n \"input\": {\r\n \"email\": \"{{rootAdminLogin_email}}\",\r\n \"password\": \"{{rootAdminLogin_password}}\"\r\n }\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Grant Power to RootAdmin",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation grantPower($userId: ID!,$power:Power!) {\r\n grantPower(userId:$userId,power:$power){\r\n __typename\r\n }\r\n}\r\n",
"variables": "{\r\n \"userId\": \"{{rootAdminUserid}}\",\r\n \"power\": \"GrantPower\"\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Root Admin Register",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();\r",
"\r",
"// This is safe check to prevent failing futher cases If the Root User is already Created\r",
"if (jsonData.errors) {\r",
" if (jsonData.errors.length) return;\r",
"}\r",
"\r",
"//Saving data for future use\r",
"var id = jsonData.data.register.user.id;\r",
"pm.globals.set(\"userid\", id);\r",
"\r",
"var user = JSON.stringify(jsonData.data.register.user);\r",
"pm.globals.set(\"user_data\", user);\r",
"\r",
"var email = jsonData.data.register.user.email.value;\r",
"pm.globals.set(\"email\", email);"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const moment = require('moment');\r",
"pm.globals.set(\"timestamp\", moment().format(\"DDMYYYYhhmmss\"));\r",
"\r",
"pm.globals.set(\"realFirstName\", \"FirstName\" + moment().format(\"DDMYYYYhhmmss\"));\r",
"pm.globals.set(\"realLastName\", \"LastName\" + moment().format(\"DDMYYYYhhmmss\"));\r",
"pm.globals.set(\"email\", \"email\" + moment().format(\"DDMYYYYhhmmss\") + \"@test.com\");\r",
"pm.globals.set(\"password\", moment().format(\"DDMYYYYhhmmss\"));\r",
"pm.globals.set(\"displayFirstName\", \"DisplayFirstName\" + moment().format(\"DDMYYYYhhmmss\"));\r",
"pm.globals.set(\"displayLastName\", \"DisplayLastName\" + moment().format(\"DDMYYYYhhmmss\"));\r",
"pm.globals.set(\"phone\", pm.variables.replaceIn('{{$randomPhoneNumber}}'));\r",
"\r",
"var timezoneObject = {\r",
" \"name\": \"Europe/Andorra\",\r",
" \"lat\": 42.5,\r",
" \"long\": 1.5167,\r",
" \"countries\": [\r",
" {\r",
" \"code\": \"AD\",\r",
" \"name\": \"Andorra\",\r",
" \"zones\": [\r",
" {\r",
" \"name\": \"Europe/Andorra\",\r",
" \"lat\": 42.5,\r",
" \"long\": 1.5167,\r",
" \"countries\": [\r",
" {\r",
" \"code\": \"AD\",\r",
" \"name\": \"Andorra\"\r",
" }\r",
" ]\r",
" }\r",
" ]\r",
" }\r",
" ]\r",
"};\r",
"pm.globals.set('timezoneObject', JSON.stringify(timezoneObject));\r",
"pm.globals.set(\"timezone\", timezoneObject.name);\r",
"\r",
"pm.globals.set(\"about\", \"I'm Admin\");\r",
"\r",
"pm.globals.set(\"userTitle\", \"Admin\");\r",
"\r",
"// Taking random value for the User status from pre-defined possible values\r",
"var userStatusArray = ['Active','Disabled'];\r",
"var randomNumber = Math.floor(Math.random()*userStatusArray.length);\r",
"// pm.globals.set('userStatus', userStatusArray[randomNumber]);\r",
"pm.globals.set(\"userStatus\", \"Active\");\r",
"\r",
"pm.globals.set(\"userRoles\", \"Administrator\");\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation register($input: RegisterInput!) {\r\n register(input: $input) {\r\n powers\r\n user {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n canDelete\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n description {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n start\r\n end\r\n }\r\n }\r\n organizations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n partners {\r\n total\r\n hasMore\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n start\r\n end\r\n description {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n }\r\n }\r\n organizations {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n partners {\r\n canCreate\r\n canRead\r\n hasMore\r\n total\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n canEdit\r\n canRead\r\n value {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
"variables": "{\r\n \"input\": {\r\n \"realFirstName\": \"Piyush\",\r\n \"realLastName\": \"Patel\",\r\n \"email\": \"{{admin_login_email}}\",\r\n \"password\": \"{{admin_login_password}}\",\r\n \"displayFirstName\": \"{{displayFirstName}}\",\r\n \"displayLastName\": \"{{displayLastName}}\",\r\n \"phone\": \"{{phone}}\",\r\n \"timezone\": \"{{timezone}}\",\r\n \"status\": \"{{userStatus}}\",\r\n \"title\": \"{{userTitle}}\",\r\n \"about\": \"{{about}}\",\r\n \"roles\": \"{{userRoles}}\"\r\n }\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Root Admin Login",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"var id = jsonData.data.login.user.id;",
"pm.globals.set(\"userid\", id);",
"",
"var email = jsonData.data.login.user.email.value;",
"pm.globals.set(\"email\", email);",
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation login($input: LoginInput!) {\r\n login(input: $input) {\r\n powers\r\n user {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n canDelete\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n #canDelete\r\n description {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n start\r\n end\r\n }\r\n }\r\n organizations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n partners {\r\n total\r\n hasMore\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n # canDelete\r\n start\r\n end\r\n description {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n }\r\n }\r\n organizations {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n partners {\r\n canCreate\r\n canRead\r\n hasMore\r\n total\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n canEdit\r\n canRead\r\n value {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
"variables": "{\r\n \"input\": {\r\n \"email\": \"{{admin_login_email}}\",\r\n \"password\": \"{{admin_login_password}}\"\r\n }\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Create Funding Account",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"var id = jsonData.data.createFundingAccount.fundingAccount.id;",
"pm.expect(id).to.not.eql(null);",
"// Saving data for future use",
"pm.globals.set(\"fundingAccountid\", id);",
"",
"// Saving whole fundingAccount Object to globals for future use",
"var fundingAccount = JSON.stringify(jsonData.data.createFundingAccount.fundingAccount);",
"pm.globals.set(\"fundingAccount_data\", fundingAccount);",
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const moment = require('moment');\r",
"\r",
"pm.globals.set('fundingAccountName', \"FundingAccountName_\" + moment().format(\"DDMMYYYYhhmmss\"));\r",
"\r",
"pm.globals.set('accountNumber', _.random(0, 9));\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation createFundingAccount($input: CreateFundingAccountInput!) {\r\n createFundingAccount(input: $input) {\r\n fundingAccount {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n}\r\n",
"variables": "{\r\n \"input\": {\r\n \"fundingAccount\": {\r\n \"name\": \"{{fundingAccountName}}\",\r\n \"accountNumber\": {{accountNumber}}\r\n }\r\n }\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Create fieldZone",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();\r",
"var fieldZoneId = jsonData.data.createFieldZone.fieldZone.id;\r",
"\r",
"// Saving data for future use\r",
"pm.globals.set(\"fieldZoneId\", fieldZoneId);\r",
"\r",
"var directorId = jsonData.data.createFieldZone.fieldZone.director.value.id;\r",
"// Saving data for future use\r",
"pm.globals.set(\"directorId\", directorId);\r",
"\r",
"// Saving whole fieldRegion Object to globals for future use\r",
"var fieldZone = JSON.stringify(jsonData.data.createFieldZone.fieldZone);\r",
"pm.globals.set(\"fieldZone_data\", fieldZone);\r",
"\r",
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const moment = require('moment');\r",
"pm.globals.set(\"timestamp\", moment().format(\"DDMYYYYhhmmss\"));\r",
"\r",
"pm.globals.set(\"fieldZoneName\", \"FieldZone\" + moment().format(\"DDMYYYYhhmmss\"));"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation createFieldZone($input: CreateFieldZoneInput!) {\r\n createFieldZone(input: $input) {\r\n fieldZone {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n #canDelete\r\n description {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n start\r\n end\r\n }\r\n }\r\n organizations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n partners {\r\n total\r\n hasMore\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n start\r\n end\r\n description {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n }\r\n }\r\n organizations {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n partners {\r\n canCreate\r\n canRead\r\n hasMore\r\n total\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n canEdit\r\n canRead\r\n value {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n \r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n \r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n canRead\r\n canEdit\r\n }\r\n }\r\n }\r\n}\r\n",
"variables": "{\r\n \"input\": {\r\n \"fieldZone\": {\r\n \"name\": \"{{fieldZoneName}}\",\r\n \"directorId\": \"{{rootAdminUserid}}\"\r\n }\r\n }\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Create fieldRegion",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();\r",
"\r",
"var id = jsonData.data.createFieldRegion.fieldRegion.id;\r",
"\r",
" // Saving data for future use\r",
" pm.globals.set(\"fieldRegionId\", id);\r",
"\r",
"// Saving whole fieldRegion Object to globals for future use\r",
"var fieldRegion = JSON.stringify(jsonData.data.createFieldRegion.fieldRegion);\r",
"pm.globals.set(\"fieldRegion_data\", fieldRegion);\r",
"\r",
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const moment = require('moment');\r",
"pm.globals.set(\"timestamp\", moment().format(\"DDMYYYYhhmmss\"));\r",
"\r",
"pm.globals.set(\"fieldRegion\", \"FieldRegion\" + moment().format(\"DDMYYYYhhmmss\"));"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation createFieldRegion($input: CreateFieldRegionInput!) {\r\n createFieldRegion(input: $input) {\r\n fieldRegion {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n #canDelete\r\n description {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n start\r\n end\r\n }\r\n }\r\n organizations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n partners {\r\n total\r\n hasMore\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n start\r\n end\r\n description {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n }\r\n }\r\n organizations {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n partners {\r\n canCreate\r\n canRead\r\n hasMore\r\n total\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n canEdit\r\n canRead\r\n value {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n \r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n \r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n fieldZone {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n #canDelete\r\n description {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n start\r\n end\r\n }\r\n }\r\n organizations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n partners {\r\n total\r\n hasMore\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n unavailabilities {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n start\r\n end\r\n description {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n }\r\n }\r\n organizations {\r\n total\r\n hasMore\r\n canCreate\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n }\r\n education {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n degree {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n major {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n institution {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n partners {\r\n canCreate\r\n canRead\r\n hasMore\r\n total\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n modifiedAt\r\n types {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n financialReportingTypes {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n pmcEntityCode {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n globalInnovationsClient {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n active {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n address {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n organization {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n avatarLetters\r\n name {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n address {\r\n value\r\n canRead\r\n canEdit\r\n }\r\n locations {\r\n total\r\n hasMore\r\n canRead\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n \r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n pointOfContact {\r\n canEdit\r\n canRead\r\n value {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n \r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n locations {\r\n canRead\r\n total\r\n hasMore\r\n canCreate\r\n items {\r\n id\r\n createdAt\r\n canDelete\r\n \r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n knownLanguages {\r\n proficiency\r\n language {\r\n id\r\n }\r\n }\r\n }\r\n canRead\r\n canEdit\r\n }\r\n }\r\n canEdit\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n canEdit\r\n canRead\r\n value {\r\n id\r\n fullName\r\n firstName\r\n avatarLetters\r\n createdAt\r\n email {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n realLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayFirstName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n displayLastName {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n phone {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n about {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n status {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n title {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n roles {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n\r\n timezone {\r\n canRead\r\n canEdit\r\n value {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n name\r\n zones {\r\n name\r\n lat\r\n long\r\n countries {\r\n code\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n unavailabilities {\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n description {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n start\r\n end\r\n }\r\n total\r\n hasMore\r\n canCreate\r\n }\r\n organizations {\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n name {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n avatarLetters\r\n }\r\n total\r\n hasMore\r\n canCreate\r\n }\r\n education {\r\n canRead\r\n items {\r\n id\r\n createdAt\r\n degree {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n major {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n institution {\r\n canRead\r\n canEdit\r\n value\r\n }\r\n }\r\n total\r\n hasMore\r\n canCreate\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",
"variables": "{\r\n \"input\": {\r\n \"fieldRegion\": {\r\n \"name\": \"{{fieldRegion}}\",\r\n \"fieldZoneId\": \"{{fieldZoneId}}\",\r\n \"directorId\": \"{{directorId}}\"\r\n }\r\n }\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "Location",
"item": [
{
"name": "Create Location Success",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"const moment = require('moment');",
"",
"var fieldRegion_data = JSON.parse(pm.variables.get(\"fieldRegion_data\"));",
"var fundingAccount_data = JSON.parse(pm.globals.get('fundingAccount_data'));",
"var fieldZone_data = JSON.parse(pm.globals.get('fieldZone_data'));",
"",
"//Common Verification",
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Response time is less than 1000ms\", function () {",
" pm.expect(pm.response.responseTime).to.be.below(Number(pm.globals.get('responseTime')));",
"});",
"",
"//Test Specific",
"pm.test(\"Verify that location ID is not blank or null\", function () {",
" var id = jsonData.data.createLocation.location.id;",
" pm.expect(id).to.not.eql(null);",
" pm.expect(id).to.not.eql(\"\");",
"",
" // Saving data for future use",
" pm.globals.set(\"locationid\", id);",
"});",
"",
"// Saving whole location Object to globals for future use",
"var location = JSON.stringify(jsonData.data.createLocation.location);",
"pm.globals.set(\"location_data\", location);",
"",
"pm.test(\"Verify that location's createdAt is in Specific time format\", function () {",
" var time = jsonData.data.createLocation.location.createdAt;",
" var isValidTime = moment(time, \"YYYY-MM-DDTHH:mm:ss.SSSZ\", true).isValid();",
" pm.expect(isValidTime).to.eql(true);",
"});",
"",
"pm.test(\"Verify that location Name is same as requested\", function () {",
" var locationName = jsonData.data.createLocation.location.name.value;",
" pm.expect(locationName).to.eql(pm.globals.get('locationName'));",
"});",
"",
"pm.test(\"Verify that location type is same as requested\", function () {",
" var type = jsonData.data.createLocation.location.type.value;",
" pm.expect(type).to.eql(pm.globals.get('locationType'));",
"});",
"",
"pm.test(\"Verify that location isoAlpha3 code is same as requested\", function () {",
" var isoAlpha3 = jsonData.data.createLocation.location.isoAlpha3.value;",
" pm.expect(isoAlpha3).to.eql(pm.globals.get('isoAlpha3'));",
"});",
"",
"// Verify fundingAccount details",
"pm.test(\"Verifying fundingAccount ID\", function () {",
" var id = jsonData.data.createLocation.location.fundingAccount.value.id;",
" pm.expect(id).to.eql(fundingAccount_data.id);",
"});",
"",
"pm.test(\"Verifying fundingAccount createdAt\", function () {",
" var createdAt = jsonData.data.createLocation.location.fundingAccount.value.createdAt;",
" pm.expect(createdAt).to.eql(fundingAccount_data.createdAt);",
"});",
"",
"pm.test(\"Verifying fundingAccount name\", function () {",
" var name = jsonData.data.createLocation.location.fundingAccount.value.name.value;",
" pm.expect(name).to.eql(fundingAccount_data.name.value);",
"});",
"",
"pm.test(\"Verifying fundingAccount accountNumber\", function () {",
" var accountNumber = jsonData.data.createLocation.location.fundingAccount.value.accountNumber.value;",
" pm.expect(accountNumber).to.eql(fundingAccount_data.accountNumber.value);",
"});",
"",
"// Verifying defaultFieldRegion details",
"",
"pm.test(\"Verifying that defaultFieldRegion ID is not blank or null\", function () {",
" var id = jsonData.data.createLocation.location.defaultFieldRegion.value.id;",
" pm.expect(id).to.not.eql(null);",
" pm.expect(id).to.not.eql(\"\");",
"});",
"",
"pm.test(\"Verifying that defaultFieldRegion createdAt is in Specific time format\", function () {",
" var time = jsonData.data.createLocation.location.defaultFieldRegion.value.createdAt;",
" var isValidTime = moment(time, \"YYYY-MM-DDTHH:mm:ss.SSSZ\", true).isValid();",
" pm.expect(isValidTime).to.eql(true);",
"});",
"",
"pm.test(\"Verifying defaultFieldRegion canDelete is true\", function () {",
" var canDelete = jsonData.data.createLocation.location.defaultFieldRegion.value.canDelete;",
" pm.expect(canDelete).to.eql(true);",
"});",
"",
"pm.test(\"Verifying defaultFieldRegion name\", function () {",
" var name = jsonData.data.createLocation.location.defaultFieldRegion.value.name.value;",
" pm.expect(name).to.eql(fieldRegion_data.name.value);",
"});",
"",
"// Verifyinging User data for FieldRegion",
"pm.test(\"Verifying director ID is not blank or null\", function () {",
" var id = jsonData.data.createLocation.location.defaultFieldRegion.value.director.value.id;",
" pm.expect(id).to.not.eql(null);",
" pm.expect(id).to.not.eql(\"\");",
"});",
"",
"pm.test(\"Verifying fieldZone ID is not blank or null\", function () {",
" var id = jsonData.data.createLocation.location.defaultFieldRegion.value.fieldZone.value.id;",
" pm.expect(id).to.not.eql(null);",
" pm.expect(id).to.not.eql(\"\");",
"});",
"",
"pm.test(\"Verifying fieldZone createdAt is in Specific time format\", function () {",
" var time = jsonData.data.createLocation.location.defaultFieldRegion.value.fieldZone.value.createdAt;",
" var isValidTime = moment(time, \"YYYY-MM-DDTHH:mm:ss.SSSZ\", true).isValid();",
" pm.expect(isValidTime).to.eql(true);",
"});",
"",
"pm.test(\"Verifying fieldZone canDelete is true\", function () {",
" var canDelete = jsonData.data.createLocation.location.defaultFieldRegion.value.fieldZone.value.canDelete;",
" pm.expect(canDelete).to.eql(true);",
"});",
"",
"pm.test(\"Verifying fieldZone name is same as requested\", function () {",
" var name = jsonData.data.createLocation.location.defaultFieldRegion.value.fieldZone.value.name.value;",
" pm.expect(name).to.eql(fieldZone_data.name.value);",
"});",
"",
"pm.test(\"Verifying fieldZone director ID is not blank or null\", function () {",
" var id = jsonData.data.createLocation.location.defaultFieldRegion.value.fieldZone.value.director.value.id;",
" pm.expect(id).to.not.eql(null);",
" pm.expect(id).to.not.eql(\"\");",
"});"
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
"const moment = require('moment');\r",
"pm.globals.set(\"timestamp\", moment().format(\"DDMMYYYYhhmmss\"));\r",
"\r",
"pm.globals.set(\"locationName\", \"LocationName\" + moment().format(\"DDMMhhmmss\"));\r",
"\r",
"// Taking random value for the locationType from pre-defined possible values\r",
"var optionsArray = ['City',\r",
" 'County',\r",
" 'State',\r",
" 'Country',\r",
" 'CrossBorderArea'];\r",
"var randomNumber = Math.floor(Math.random() * optionsArray.length);\r",
"pm.globals.set('locationType', optionsArray[randomNumber]);\r",
"\r",
"// Taking random value for the locationSensitivity from pre-defined possible values\r",
"var optionsArray = ['Low', 'Medium', 'High'];\r",
"var randomNumber = Math.floor(Math.random() * optionsArray.length);\r",
"pm.globals.set('locationSensitivity', optionsArray[randomNumber]);\r",
"\r",
"// Taking random value for the isoAlpha3 from pre-defined possible values\r",
"var optionsArray = ['ABW',\r",
" 'USA',\r",
" 'ALA',\r",
" 'IND',\r",
" 'AUS'];\r",
"var randomNumber = Math.floor(Math.random() * optionsArray.length);\r",
"pm.globals.set('isoAlpha3', optionsArray[randomNumber]);\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation createLocation($input: CreateLocationInput!) {\r\n createLocation(input: $input) {\r\n location {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n defaultFieldRegion {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n value {\r\n id\r\n }\r\n canEdit\r\n canRead\r\n }\r\n fieldZone {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n value {\r\n id\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n}\r\n",
"variables": "{\r\n \"input\": {\r\n \"location\": {\r\n \"name\": \"{{locationName}}\",\r\n \"type\": \"{{locationType}}\",\r\n \"isoAlpha3\": \"{{isoAlpha3}}\",\r\n \"fundingAccountId\": \"{{fundingAccountid}}\",\r\n \"defaultFieldRegionId\":\"{{fieldRegionId}}\"\r\n }\r\n }\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Create Location Mandatory Field Blank - Name",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"//Common Verification",
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Response time is less than 1000ms\", function () {",
" pm.expect(pm.response.responseTime).to.be.below(Number(pm.globals.get('responseTime')));",
"});",
"",
"//Test Specific",
"pm.test(\"Verify that error message is correct\", function () {",
" var error_message = jsonData.errors[0].message;",
" pm.expect(error_message).to.eql(\"Input validation failed\");",
"});",
"",
"pm.test(\"Verify that error status is 400\", function () {",
" var error_status = jsonData.errors[0].extensions.status;",
" pm.expect(error_status).to.eql(400);",
"});",
"",
"pm.test(\"Verify that minLength message is correct\", function () {",
" var minLength_message = jsonData.errors[0].extensions.errors['location.name'].minLength;",
" pm.expect(minLength_message).to.eql(\"name must be longer than or equal to 1 characters\");",
"});",
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation createLocation($input: CreateLocationInput!) {\r\n createLocation(input: $input) {\r\n location {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n defaultFieldRegion {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n value {\r\n id\r\n }\r\n canEdit\r\n canRead\r\n }\r\n fieldZone {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n value {\r\n id\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n}\r\n",
"variables": "{\r\n \"input\": {\r\n \"location\": {\r\n \"name\": \"\",\r\n \"type\": \"{{locationType}}\",\r\n \"isoAlpha3\": \"{{isoAlpha3}}\",\r\n \"fundingAccountId\": \"{{fundingAccountid}}\"\r\n }\r\n }\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Create Location Mandatory Field Removed - Name",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"//Common Verification",
"pm.test(\"Status code is 400 Bad Request\", function () {",
" pm.response.to.have.status(400);",
"});",
"",
"pm.test(\"Response time is less than 1000ms\", function () {",
" pm.expect(pm.response.responseTime).to.be.below(Number(pm.globals.get('responseTime')));",
"});",
"",
"//Test Specific",
"pm.test(\"Verify that error message is correct\", function () {",
" var error_message = jsonData.errors[0].message;",
" pm.expect(error_message).to.include(\"Field \\\"name\\\" of required type \\\"String!\\\" was not provided.\");",
"});",
"",
"pm.test(\"Verify that error code is BAD_USER_INPUT\", function () {",
" var error_code = jsonData.errors[0].extensions.code;",
" pm.expect(error_code).to.eql(pm.globals.get('badRequestErrorCode'));",
"});",
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation createLocation($input: CreateLocationInput!) {\r\n createLocation(input: $input) {\r\n location {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n type {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoAlpha3 {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n isoCountry {\r\n country\r\n alpha2\r\n alpha3\r\n numeric\r\n }\r\n fundingAccount {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n accountNumber {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n defaultFieldRegion {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n value {\r\n id\r\n }\r\n canEdit\r\n canRead\r\n }\r\n fieldZone {\r\n value {\r\n id\r\n createdAt\r\n canDelete\r\n name {\r\n value\r\n canEdit\r\n canRead\r\n }\r\n director {\r\n value {\r\n id\r\n }\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n canEdit\r\n canRead\r\n }\r\n }\r\n }\r\n}\r\n",
"variables": "{\r\n \"input\": {\r\n \"location\": {\r\n \"type\": \"{{locationType}}\",\r\n \"isoAlpha3\": \"{{isoAlpha3}}\",\r\n \"fundingAccountId\": \"{{fundingAccountid}}\"\r\n }\r\n }\r\n}"
}
},
"url": {
"raw": "{{env}}/graphql",
"host": [
"{{env}}"
],
"path": [
"graphql"
]
}
},
"response": []
},
{
"name": "Create Location Mandatory Field Blank - Type",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"//Common Verification",
"pm.test(\"Status code is 400 Bad Request\", function () {",
" pm.response.to.have.status(400);",
"});",
"",
"pm.test(\"Response time is less than 1000ms\", function () {",
" pm.expect(pm.response.responseTime).to.be.below(Number(pm.globals.get('responseTime')));",
"});",
"",
"//Test Specific",
"pm.test(\"Verify that error message is correct\", function () {",
" var error_message = jsonData.errors[0].message; ",
" pm.expect(error_message).to.include(\"does not exist in \\\"LocationType\\\" enum\");",
"});",
"",
"pm.test(\"Verify that error code is BAD_USER_INPUT\", function () {",
" var error_code = jsonData.errors[0].extensions.code; ",
" pm.expect(error_code).to.eql(pm.globals.get('badRequestErrorCode'));",
"});",
""
],
"type": "text/javascript"
}
},
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": {