-
Notifications
You must be signed in to change notification settings - Fork 133
/
VTEX - License Manager API.json
5400 lines (5400 loc) · 324 KB
/
VTEX - License Manager API.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
{
"openapi": "3.0.0",
"info": {
"title": "License Manager API",
"description": "The License Manager API allows you to create users, modify their names and emails, add and remove [roles](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc) from users, and create and manage [appKeys](https://help.vtex.com/en/tutorial/application-keys--2iffYzlvvz4BDMr6WGUtet).\r\n\r\n## Common parameters\r\n\r\n|Attribute name | Description |\r\n|:------------|--------------|\r\n|`accountName` | Account name in VTEX License Manager. |\r\n|`environment` | Environment on which you want to run the query, e.g. `vtexcommercestable`. |\r\n|`userId` | Unique user identification string. |\r\n|`roleId` | Integer that represents a role, can be obtained from the [Get List of Roles](https://developers.vtex.com/docs/api-reference/license-manager-api#get-/api/license-manager/site/pvt/roles/list/paged) endpoint. |\r\n\r\n## Index\r\n\r\n### User\r\n\r\n- `GET` [Get user](https://developers.vtex.com/docs/api-reference/license-manager-api#get-/api/license-manager/users/-userId-)\r\n- `DELETE` [Delete user](https://developers.vtex.com/docs/api-reference/license-manager-api#delete-/api/license-manager/users/-userId-)\r\n- `POST` [Create user](https://developers.vtex.com/docs/api-reference/license-manager-api#post-/api/license-manager/users)\r\n- `GET` [Get list of users](https://developers.vtex.com/docs/api-reference/license-manager-api#get-/api/license-manager/site/pvt/logins/list/paged)\r\n\r\n### Roles\r\n\r\n- `PUT` [Add roles to user or appKey](https://developers.vtex.com/docs/api-reference/license-manager-api#put-/api/license-manager/users/-userId-/roles)\r\n- `GET` [Get roles by user or appKey](https://developers.vtex.com/docs/api-reference/license-manager-api#get-/api/license-manager/users/-userId-/roles)\r\n- `DELETE` [Remove role from user or appKey](https://developers.vtex.com/docs/api-reference/license-manager-api#delete-/api/license-manager/users/-userId-/roles/-roleId-)\r\n- `GET` [Get list of roles](https://developers.vtex.com/docs/api-reference/license-manager-api#get-/api/license-manager/site/pvt/roles/list/paged)\r\n\r\n### App Keys\r\n\r\n- `POST` [Create new appkey](https://developers.vtex.com/docs/api-reference/license-manager-api#post-/api/vlm/appkeys)\r\n- `GET` [Get appKeys from account](https://developers.vtex.com/docs/api-reference/license-manager-api#get-/api/vlm/appkeys)\r\n- `PUT` [Update appKey](https://developers.vtex.com/docs/api-reference/license-manager-api#put-/api/vlm/appkeys/-id-)\r\n\r\n### Store\r\n\r\n- `GET` [Get stores](https://developers.vtex.com/docs/api-reference/license-manager-api#get-/api/vlm/account/stores)\r\n\r\n### Account\r\n\r\n- `GET` [Get information about account](https://developers.vtex.com/docs/api-reference/license-manager-api#get-/api/vlm/account)",
"version": "1.0"
},
"servers": [
{
"url": "https://{accountName}.{environment}.com.br",
"description": "VTEX server URL.",
"variables": {
"accountName": {
"description": "Name of the VTEX account. Used as part of the URL",
"default": "apiexamples"
},
"environment": {
"description": "Environment to use. Used as part of the URL.",
"enum": [
"vtexcommercestable"
],
"default": "vtexcommercestable"
}
}
}
],
"paths": {
"/api/license-manager/users/{userId}": {
"get": {
"tags": [
"Users"
],
"summary": "Get user",
"description": "Allows you to get a user from the database, using the `userId` as the identifier. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Remove user** |\r\n| License Manager | Services access control | **Save user** |\r\n| License Manager | Services access control | **Find user by email** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| User Administrator - RESTRICTED | Save user |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"operationId": "GetUser",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"name": "userId",
"in": "path",
"description": "ID from queried user.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "e845b52a40e24654a2c70766adb5762b"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "ID of the user.",
"type": "string"
},
"name": {
"description": "Name of the user.",
"type": "string"
},
"email": {
"description": "Email of the user.",
"type": "string"
}
}
},
"example": {
"id": "e845b52a40e24654a2c70766adb5762b",
"name": "Jane",
"email": "[email protected]"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Message": {
"description": "Error message.",
"type": "string"
}
}
},
"example": {
"Message": "Invalid UserId"
}
}
}
},
"405": {
"description": "Method Not Allowed - A null `userId` sends the request to a path that is not allowed."
}
},
"deprecated": false
},
"delete": {
"tags": [
"Users"
],
"summary": "Delete user",
"description": "Allows you to delete a user from the database, using the `userId` as the identifier. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Save user** |\r\n| License Manager | Services access control | **Remove user** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| User Administrator - RESTRICTED | Save user |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"name": "userId",
"in": "path",
"description": "ID from queried user.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "e845b52a40e24654a2c70766adb5762b"
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Message": {
"description": "Error message.",
"type": "string"
}
}
},
"example": {
"Message": "Invalid UserId"
}
}
}
}
},
"deprecated": false
}
},
"/api/license-manager/users": {
"post": {
"tags": [
"Users"
],
"summary": "Create user",
"description": "Allows you to create a user by providing an email (mandatory) and name (optional). The email must be in a valid format. The success response will contain the generated `userId` for that user. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Save user** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| User Administrator - RESTRICTED | Save user |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"operationId": "CreateUser",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateUserRequest"
},
"example": {
"name": "Jane",
"email": "[email protected]"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"description": "ID of the user.",
"type": "string"
},
"email": {
"description": "Email of the user.",
"type": "string"
},
"name": {
"description": "Name of the user.",
"type": "string"
}
}
},
"example": {
"id": "a404870467d24533a085a6b3c6a5a320",
"email": "[email protected]",
"name": "Jane"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Message": {
"type": "string",
"description": "Error message."
}
}
},
"example": {
"Message": "Invalid email"
}
}
}
}
},
"deprecated": false
}
},
"/api/license-manager/site/pvt/logins/list/paged": {
"get": {
"tags": [
"Users"
],
"summary": "Get list of users",
"description": "Returns a list of registered users. The response is divided in pages. The query parameter `numItems` defines the number of items in each page, and consequently the amount of pages for the whole list. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Get paged users** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "GetListUsers",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"name": "numItems",
"in": "query",
"description": "Number of items in the returned page.",
"required": false,
"style": "form",
"schema": {
"type": "integer",
"example": 10
}
},
{
"name": "pageNumber",
"in": "query",
"description": "Which page from the whole list will be returned.",
"required": false,
"style": "form",
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "sort",
"in": "query",
"description": "Chooses the field that the list will be sorted by.",
"required": false,
"style": "form",
"schema": {
"type": "string",
"example": "name"
}
},
{
"name": "sortType",
"in": "query",
"description": "Defines the sorting order. `ASC` is used for ascendant order. `DSC` is used for descendant order.",
"required": false,
"style": "form",
"schema": {
"type": "string",
"example": "ASC"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListUsersResponse"
},
"example": {
"items": [
{
"id": "a404870467d24533a085a6b3c6a5a320",
"email": "[email protected]",
"isAdmin": false,
"isReliable": false,
"isBlocked": false,
"roles": [],
"accountNames": [],
"name": "testuser"
}
],
"paging": {
"page": 1,
"perPage": 1,
"total": 1,
"pages": 1
}
}
}
}
}
}
}
},
"/api/license-manager/users/{userId}/roles": {
"put": {
"tags": [
"Roles"
],
"summary": "Add roles to user or appKey",
"description": "Allows you to add License Manager [roles](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc) to a particular user or application key by specifying the list of role IDs on the request body. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Save user** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| User Administrator - RESTRICTED | Save user |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"operationId": "PutRolesinUser",
"parameters": [
{
"name": "userId",
"in": "path",
"description": "ID of the user.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "a404870467d24533a085a6b3c6a5a320"
}
}
],
"requestBody": {
"description": "List of role IDs to add to the user or application key.",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "Array containing role IDs.",
"items": {
"type": "integer",
"format": "int32",
"description": "Role ID, which can be obtained from the [Get List of Roles](https://developers.vtex.com/docs/api-reference/license-manager-api#get-/api/license-manager/site/pvt/roles/list/paged) endpoint.",
"example": 9000
}
},
"example": [
9000,
9111,
9333,
9444
]
}
},
"required": true
},
"responses": {
"204": {
"description": "Success - A no-content response, but the roles were added successfully."
},
"400": {
"description": "Bad Request - A userId or role list with invalid format. The message on the body of the response will contain further information.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Message": {
"description": "Error message.",
"type": "string"
}
}
},
"example": {
"Message": "Roles list contains roles that do not exist in this account"
}
}
}
},
"500": {
"description": "Unexpected error - One possible reason is that the userId is not present on the database.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Message": {
"type": "string",
"description": "Error message."
}
}
},
"example": {
"Message": "Unexpected error"
}
}
}
}
},
"deprecated": false
},
"get": {
"tags": [
"Roles"
],
"summary": "Get roles by user or appKey",
"description": "Retrieves License Manager [roles](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc) of a particular user or application key. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Find user by email** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "GetRolesbyUser",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"name": "userId",
"in": "path",
"description": "ID of the user.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "e845b52a40e24654a2c70766adb5762b"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "Array of role objects.",
"items": {
"type": "object",
"description": "Object with information about each role.",
"properties": {
"id": {
"description": "ID of role.",
"type": "integer",
"format": "int32"
},
"name": {
"description": "Name of the role.",
"type": "string"
}
}
}
},
"example": [
{
"id": 957,
"name": "Call center operator"
},
{
"id": 1,
"name": "Owner (Admin Super)"
}
]
}
}
}
},
"deprecated": false
}
},
"/api/license-manager/users/{userId}/roles/{roleId}": {
"delete": {
"tags": [
"Roles"
],
"summary": "Remove role from user or appKey",
"description": "Allows you to remove a License Manager [role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc) from a specific user or application key. This method only allows the removal of one role per request. The role's ID must be specified on the request path, not on the request body.\n\r\n\r> Note that a successful response returns a `204` response with an empty body. A deletion on a role or user that does not exist will also return a `204`. Thus, this method should not be used to verify the existence of a specific user or role. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Save user** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| User Administrator - RESTRICTED | Save user |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"operationId": "RemoveRolefromUser",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"name": "userId",
"in": "path",
"description": "ID of the user.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "e845b52a40e24654a2c70766adb5762b"
}
},
{
"name": "roleId",
"in": "path",
"description": "ID of the role which will be removed from the user.",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "1"
}
}
],
"responses": {
"204": {
"description": "Success - A no-content response, but the role deletion was performed successfully."
},
"400": {
"description": "Bad Request - A userId or role list with invalid format. The message on the body of the response will contain further information.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"Message": {
"type": "string",
"description": "Error message."
}
}
},
"example": {
"Message": "Invalid UserId"
}
}
}
},
"405": {
"description": "Method Not Allowed"
}
},
"deprecated": false
}
},
"/api/license-manager/site/pvt/roles/list/paged": {
"get": {
"tags": [
"Roles"
],
"summary": "Get list of roles",
"description": "Returns a list of License Manager [roles](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc). The response is divided in pages. The query parameter `numItems` defines the number of items in each page, and consequently the amount of pages for the whole list. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Get paged roles** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>\u2757 To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.",
"operationId": "GetListRoles",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
},
{
"$ref": "#/components/parameters/Accept"
},
{
"name": "numItems",
"in": "query",
"description": "Number of items in the returned page.",
"required": false,
"style": "form",
"schema": {
"type": "integer",
"example": 10
}
},
{
"name": "pageNumber",
"in": "query",
"description": "Which page from the whole list will be returned.",
"required": false,
"style": "form",
"schema": {
"type": "integer",
"example": 1
}
},
{
"name": "sort",
"in": "query",
"description": "Chooses the field that the list will be sorted by.",
"required": false,
"style": "form",
"schema": {
"type": "string",
"example": "id"
}
},
{
"name": "sortType",
"in": "query",
"description": "Defines the sorting order. `ASC` is used for ascendant order. `DSC` is used for descendant order.",
"required": false,
"style": "form",
"schema": {
"type": "string",
"example": "ASC"
}
}
],
"responses": {
"200": {
"description": "Success",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListRolesResponse"
},
"example": {
"items": [
{
"id": 957,
"isAdmin": false,
"roleType": 0,
"products": [
{
"id": null,
"categoryId": null,
"categoryName": null,
"description": null,
"consoleUrlMask": null,
"urlConfiguration": null,
"webApiUrlMask": null,
"url": null,
"productResources": null,
"name": "Catalog"
},
{
"id": null,
"categoryId": null,
"categoryName": null,
"description": null,
"consoleUrlMask": null,
"urlConfiguration": null,
"webApiUrlMask": null,
"url": null,
"productResources": null,
"name": "OMS"
}
],
"resources": null,
"logins": null,
"name": "Call center operator"
}
],
"paging": {
"page": 1,
"perPage": 1,
"total": 1,
"pages": 1
}
}
}
}
}
}
}
},
"/api/vlm/appkeys": {
"post": {
"tags": [
"App Keys"
],
"summary": "Create new appKey",
"description": "Creates a new pair of `appKey` and `appToken`. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Save user** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| User Administrator - RESTRICTED | Save user |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"operationId": "Createnewappkey",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreatenewappkeyRequest"
},
"example": {
"label": "my new appkey"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"headers": {},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreatenewappkeyResponse"
},
"example": {
"id": "a2555e95-9db8-48be-94f8-2a28577c0b4a",
"appKey": "vtexappkey-myaccount-ORYNWX",
"appToken": "WNVUJKYFKJFLTPXHQGAZDHPBHSDQVJJWSFZUBOGCKPEXAIFHTPANKJTOXUKRIIJAAJSOPCFBAXOODRABMUXFJVLJLKWGEOUCFDXRPRRQKYNNUFLGTIEOKERFXJCFFYXL",
"label": "my new appkey",
"createdIn": "2018-07-04T14:09:08.2718405Z",
"isActive": true
}
}
}
}
},
"deprecated": false
},
"get": {
"tags": [
"App Keys"
],
"summary": "Get appKeys from account",
"description": "Retrieves all application keys from an account. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Save user** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| User Administrator - RESTRICTED | Save user |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"operationId": "Getappkeysfromaccount",
"parameters": [
{
"$ref": "#/components/parameters/Content-Type"
}
],
"responses": {
"200": {
"description": "Success",
"headers": {},
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "Array of AppKeys object",
"items": {
"$ref": "#/components/schemas/Getappkeysfromaccount"
}
},
"example": [
{
"id": "a2555e95-9db8-48be-94f8-2a28577c0b4a",
"appKey": "vtexappkey-myaccount-ORYNWX",
"label": "my new appkey",
"createdIn": "2018-07-04T14:09:08.2718405Z",
"isActive": true
},
{
"id": "a2555e95-9db8-48be-94f8-2a28577c0b4a",
"appKey": "vtexappkey-myaccount-ORKPDC",
"label": "my other appkey",
"createdIn": "2018-07-04T14:09:08.2718405Z",
"isActive": true
}
]
}
}
}
},
"deprecated": false
}
},
"/api/vlm/appkeys/{id}": {
"put": {
"tags": [
"App Keys"
],
"summary": "Update appKey",
"description": "Activates or deactivates an `appKey` by its ID. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Save user** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| User Administrator - RESTRICTED | Save user |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"operationId": "Updateappkey",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID from the appKey which will be updated",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "Request body for updating AppKeys",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateappkeyRequest"
},
"example": {
"isActive": false
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"headers": {}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VLMError"
},
"example": {
"Details": null,
"HttpStatusCode": 400,
"VLMErrorCode": 17,
"Message": "Token not exists for this account"
}
}
}
}
},
"deprecated": false
}
},
"/api/vlm/account/stores": {
"get": {
"tags": [
"Stores"
],
"summary": "Get stores",
"description": "Retrieves the stores of the account and their respective hosts. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Save account** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| Finance - Full access | Save account |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm). \r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"operationId": "GetByAccount",
"parameters": [],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "Array of store objects.",
"items": {
"$ref": "#/components/schemas/StoreItems"
}
},
"example": [
{
"id": 1213,
"name": "ambientecrm",
"hosts": [
"loja.ambientecrm.com.br",
"www.ambientecrm.com.br"
]
},
{
"id": 213,
"name": "ambienteqa",
"hosts": [
"loja.blackbox.com.br",
"www.blackbox.com.br"
]
}
]
}
}
}
},
"deprecated": false
}
},
"/api/vlm/account": {
"get": {
"tags": [
"Account"
],
"summary": "Get information about account",
"description": "Retrieves information from an account, such as company and sponsor user details, stores, and appTokens.\n\r\n\rThis endpoint only accepts requests from the host list designated for that store. If you want to try this request from this portal, be sure to add it to the list. Learn how to add hosts to the list in [How to manage accounts](https://help.vtex.com/en/tutorial/how-to-manage-accounts--tutorials_6285#). \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| License Manager | Services access control | **Save account** |\r\n\r\nYou can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):\r\n\r\n| **Role** | **Resource** | \r\n| --------------- | ----------------- | \r\n| Finance - Full access | Save account |\r\n\r\n>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm).\r\n\r\n To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).",
"operationId": "GetAccount",
"parameters": [],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountResponse"
},
"example": {
"isActive": true,
"id": "71fe5fdabc4940ad81c226d43b754ba8",
"name": "UNISUPER, SOCIEDAD ANONIMA",
"accountName": "apiexamples",
"lv": null,
"isOperating": false,
"defaultUrl": null,
"district": null,
"country": null,
"complement": null,
"companyName": "UNISUPER, SOCIEDAD ANONIMA",
"cnpj": null,
"haveParentAccount": false,
"parentAccountId": null,
"parentAccountName": null,
"city": null,
"address": null,
"logo": null,
"hasLogo": false,
"number": null,
"postalCode": null,
"state": null,
"telephone": "+219999999",
"tradingName": "UNISUPER, SOCIEDAD ANONIMA",
"licenses": [
{
"expiration": null,
"id": 24,
"isPurchased": false,
"products": [
{
"id": 1,
"domains": [],
"endpoints": {
"webApiUrl": null,
"consoleUrl": null
},
"name": "License Manager"
},
{
"id": 9,
"domains": [],
"endpoints": {
"webApiUrl": null,
"consoleUrl": null
},
"name": "Logistics"
},
{
"id": 14,
"domains": [],
"endpoints": {
"webApiUrl": null,
"consoleUrl": null
},
"name": "Log"
},
{
"id": 23,
"domains": [],
"endpoints": {
"webApiUrl": null,
"consoleUrl": null
},
"name": "Message Center"
},
{
"id": 43,
"domains": [],
"endpoints": {
"webApiUrl": null,
"consoleUrl": null
},
"name": "Billing"
},
{
"id": 55,
"domains": [],
"endpoints": {
"webApiUrl": null,
"consoleUrl": null
},
"name": "Audit"
},
{
"id": 64,
"domains": [],
"endpoints": {
"webApiUrl": null,
"consoleUrl": null
},
"name": "Vtex ID"
},
{
"id": 66,
"domains": [],
"endpoints": {
"webApiUrl": null,
"consoleUrl": null
},
"name": "VTEX IO"
},
{
"id": 73,
"domains": [],
"endpoints": {
"webApiUrl": null,
"consoleUrl": null
},