-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathstorage.json
1595 lines (1595 loc) · 48.7 KB
/
storage.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
{
"servers": [
{
"url": "https://api.{region}.saucelabs.{tld}",
"variables": {
"region": {
"default": "us-west-1",
"description": "region of datacenter",
"enum": [
"us-west-1",
"eu-central-1"
]
},
"tld": {
"default": "com",
"description": "internal or external API",
"enum": [
"net",
"com"
]
}
}
}
],
"components": {
"schemas": {
"Access": {
"properties": {
"org_ids": {
"description": "list of organization ids that are allowed to access this entity",
"items": {
"type": "string"
},
"type": "array"
},
"team_ids": {
"description": "list of team ids that are allowed to access this entity",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"AndroidMetadata": {
"properties": {
"icon": {
"description": "base64-encoded PNG representation of the app icon",
"nullable": true,
"type": "string"
},
"identifier": {
"description": "unique package name",
"example": "com.mycompany.app",
"type": "string"
},
"is_test_runner": {
"description": "true if the current package is a test runner",
"nullable": true,
"type": "boolean"
},
"min_sdk": {
"description": "minimum Android SDK version number this package supports",
"example": 21,
"format": "int32",
"nullable": true,
"type": "integer"
},
"name": {
"description": "application name",
"example": "My Cool App",
"type": "string"
},
"target_sdk": {
"description": "Android SDK version number this package was built for",
"example": 28,
"format": "int32",
"nullable": true,
"type": "integer"
},
"version": {
"description": "value of versionName manifest value",
"example": "1.2.3",
"type": "string"
},
"version_code": {
"description": "value of versionCode manifest value",
"example": 123,
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"AndroidSettings": {
"description": "passing null to any setting tells the backend to reset it to its default value",
"properties": {
"instrumentation": {
"allOf": [
{
"$ref": "#/components/schemas/Instrumentation"
}
],
"description": "dictionary containing settings that depend on the app instrumentation state",
"nullable": true
},
"instrumentation_enabled": {
"default": true,
"description": "true if the app must be instrumented before running tests on it",
"nullable": true,
"type": "boolean"
},
"lang": {
"default": "en_GB",
"description": "language abbreviation to set for the app. See BCP-47 for more details",
"type": "string"
},
"orientation": {
"allOf": [
{
"$ref": "#/components/schemas/Orientation"
}
],
"default": null,
"description": "orientation value to set by default for the app",
"nullable": true
},
"proxy": {
"allOf": [
{
"$ref": "#/components/schemas/Proxy"
}
],
"description": "proxy settings",
"nullable": true
},
"proxy_enabled": {
"default": false,
"description": "the given host and port will be applied to proxy network requests in automated tests if set to true",
"nullable": true,
"type": "boolean"
}
},
"type": "object"
},
"EditableFileProperties": {
"properties": {
"description": {
"description": "an optional custom description string of the file",
"maxLength": 255,
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"Error": {
"properties": {
"code": {
"description": "status code",
"format": "int32",
"type": "integer"
},
"detail": {
"description": "details string",
"type": "string"
},
"title": {
"description": "title string",
"type": "string"
}
},
"type": "object"
},
"File": {
"properties": {
"access": {
"allOf": [
{
"$ref": "#/components/schemas/Access"
}
],
"description": "teams and orgs that have access to the file",
"nullable": true
},
"description": {
"description": "an optional custom description string of the file",
"type": "string"
},
"etag": {
"description": "hash sum of the uploaded binary calculated by the downstream storage",
"type": "string"
},
"group_id": {
"description": "unique identifier of the group this file belongs to",
"format": "int64",
"type": "integer"
},
"id": {
"description": "unique identifier of the file",
"type": "string"
},
"kind": {
"allOf": [
{
"$ref": "#/components/schemas/Kind"
}
],
"description": "file platform name"
},
"metadata": {
"description": "app metadata. Could be null for non-application groups",
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/IOSMetadata"
},
{
"$ref": "#/components/schemas/AndroidMetadata"
}
]
},
"name": {
"description": "name of the file on the file system",
"type": "string"
},
"owner": {
"allOf": [
{
"$ref": "#/components/schemas/Owner"
}
],
"description": "the info about the original file uploader"
},
"upload_timestamp": {
"description": "file upload timestamp in UTC seconds since Unix Epoch",
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"Group": {
"properties": {
"access": {
"allOf": [
{
"$ref": "#/components/schemas/Access"
}
],
"description": "teams and orgs that have access to the current group"
},
"count": {
"description": "the count of files in the group",
"format": "int64",
"type": "integer"
},
"id": {
"description": "unique identifier of the group",
"format": "int64",
"type": "integer"
},
"name": {
"description": "the name of the group",
"type": "string"
},
"recent": {
"allOf": [
{
"$ref": "#/components/schemas/File"
}
],
"description": "The most recently uploaded file info",
"nullable": true
},
"settings": {
"description": "group settings. Could be null for non-application groups",
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/IOSSettings"
},
{
"$ref": "#/components/schemas/AndroidSettings"
}
]
}
},
"type": "object"
},
"IOSMetadata": {
"properties": {
"icon": {
"description": "base64-encoded PNG representation of the app icon",
"nullable": true,
"type": "string"
},
"identifier": {
"description": "unique package name",
"example": "com.mycompany.app",
"type": "string"
},
"is_simulator": {
"description": "true if the current package was built for Simulator",
"type": "boolean"
},
"is_test_runner": {
"description": "true if the current package is a test runner",
"nullable": true,
"type": "boolean"
},
"min_os": {
"description": "minimum iOS version number this package supports",
"example": "10",
"nullable": true,
"type": "string"
},
"name": {
"description": "application name",
"example": "My Cool App",
"type": "string"
},
"short_version": {
"description": "value of CFBundleShortVersionString manifest entry",
"example": "1.2.3",
"type": "string"
},
"target_os": {
"description": "IOS version number this package was built for",
"example": "13",
"nullable": true,
"type": "string"
},
"version": {
"description": "value of CFBundleVersion manifest entry",
"example": "123",
"type": "string"
}
},
"type": "object"
},
"IOSSettings": {
"description": "passing null to any setting tells the backend to reset it to its default value",
"properties": {
"lang": {
"default": "en_GB",
"description": "language abbreviation to set for the app. See BCP-47 for more details",
"type": "string"
},
"orientation": {
"allOf": [
{
"$ref": "#/components/schemas/Orientation"
}
],
"default": null,
"description": "orientation value to set by default for the app",
"nullable": true
},
"proxy": {
"allOf": [
{
"$ref": "#/components/schemas/Proxy"
}
],
"description": "proxy settings",
"nullable": true
},
"proxy_enabled": {
"default": false,
"description": "the given host and port will be applied to proxy network requests in automated tests if set to true",
"nullable": true,
"type": "boolean"
},
"resigning": {
"allOf": [
{
"$ref": "#/components/schemas/Resigning"
}
],
"description": "dictionary containing settings that depend on the app instrumentation state",
"nullable": true
},
"resigning_enabled": {
"default": true,
"description": "true if the app must be instrumented before running tests on it",
"nullable": true,
"type": "boolean"
}
},
"type": "object"
},
"Instrumentation": {
"properties": {
"bypass_screenshot_restriction": {
"default": false,
"description": "whether to bypass Android restrictions while taking screenshots of views marked with FLAG_SECURE",
"nullable": true,
"type": "boolean"
},
"image_injection": {
"default": true,
"description": "whether to enable image injection",
"nullable": true,
"type": "boolean"
}
},
"type": "object"
},
"Kind": {
"enum": [
"ios",
"android",
"other"
],
"type": "string"
},
"Links": {
"properties": {
"next": {
"default": null,
"description": "relative link to the next page",
"example": "?q=2&page=3%per_page=20",
"nullable": true,
"type": "string"
},
"prev": {
"default": null,
"description": "relative link to the previous page",
"example": "?q=2&page=1%per_page=20",
"nullable": true,
"type": "string"
},
"self": {
"default": null,
"description": "relative link to the current page",
"example": "?q=2&page=2%per_page=20",
"nullable": true,
"type": "string"
}
},
"type": "object"
},
"Orientation": {
"enum": [
"LANDSCAPE",
"PORTRAIT"
],
"type": "string"
},
"Owner": {
"properties": {
"id": {
"description": "unique identifier of the file uploader",
"type": "string"
},
"org_id": {
"description": "unique identifier of the organization where the file uploader participates",
"type": "string"
}
},
"type": "object"
},
"Proxy": {
"properties": {
"host": {
"default": "",
"description": "valid proxy host name",
"type": "string"
},
"port": {
"default": 0,
"description": "valid port number in range 1..65535",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"Resigning": {
"properties": {
"biometrics": {
"default": true,
"description": "whether to enable biometrics",
"nullable": true,
"type": "boolean"
},
"group_directory": {
"default": false,
"description": "whether to enable group directory access",
"nullable": true,
"type": "boolean"
},
"image_injection": {
"default": true,
"description": "Whether to enable image injection",
"nullable": true,
"type": "boolean"
},
"sys_alerts_delay": {
"default": false,
"description": "whether to delay system alerts",
"nullable": true,
"type": "boolean"
}
},
"type": "object"
}
},
"securitySchemes": {
"basicAuth": {
"scheme": "basic",
"type": "http"
},
"bearerAuth": {
"bearerFormat": "JWT",
"scheme": "bearer",
"type": "http"
}
}
},
"info": {
"title": "App Storage Service API",
"version": "1.0.0"
},
"basePath": "",
"openapi": "3.0.0",
"paths": {
"/v1/storage/download/{file_id}": {
"get": {
"operationId": "downloadStorageFile",
"parameters": [
{
"description": "ID of file that needs to be fetched",
"explode": false,
"in": "path",
"name": "file_id",
"required": true,
"type": "string",
"schema": {
"type": "string"
},
"style": "simple"
}
],
"responses": {
"200": {
"content": {
"application/octet-stream": {
"schema": {
"format": "binary",
"type": "string"
}
}
},
"description": "successful operation"
},
"304": {
"description": "the file has been already cached on the client side"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "authorization failed"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "the file with the given ID has not been found or is expired"
},
"412": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "the current user is not in xTM"
}
},
"security": [
{
"bearerAuth": []
},
{
"basicAuth": []
}
],
"summary": "This end-point allows to download the files previously uploaded to the storage.",
"tags": [
"Download File"
]
}
},
"/v1/storage/files": {
"get": {
"operationId": "getStorageFiles",
"parameters": [
{
"description": "one or more file ids to be listed",
"explode": true,
"in": "query",
"name": "file_id",
"required": false,
"schema": {
"items": {
"type": "string"
},
"type": "array"
},
"style": "form"
},
{
"description": "one or more team ids the listed file(s) should be shared with",
"explode": true,
"in": "query",
"name": "team_id",
"required": false,
"schema": {
"items": {
"type": "string"
},
"type": "array"
},
"style": "form"
},
{
"description": "one or more org ids the listed file(s) should be shared with",
"explode": true,
"in": "query",
"name": "org_id",
"required": false,
"schema": {
"items": {
"type": "string"
},
"type": "array"
},
"style": "form"
},
{
"description": "the search term. The lookup is done using version names, codes, app names, identifiers and file names",
"explode": true,
"in": "query",
"name": "q",
"required": false,
"schema": {
"type": "string"
},
"style": "form"
},
{
"description": "one or more platform types",
"explode": true,
"in": "query",
"name": "kind",
"required": false,
"schema": {
"items": {
"$ref": "#/components/schemas/Kind"
},
"type": "array"
},
"style": "form"
},
{
"description": "the number of the current page to show",
"explode": true,
"in": "query",
"name": "page",
"required": false,
"schema": {
"default": 1,
"format": "int32",
"minimum": 1,
"type": "integer"
},
"style": "form"
},
{
"description": "the number of items per page",
"explode": true,
"in": "query",
"name": "per_page",
"required": false,
"schema": {
"default": 25,
"format": "int32",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"style": "form"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"items": {
"description": "The list of found files",
"items": {
"$ref": "#/components/schemas/File"
},
"type": "array"
},
"links": {
"$ref": "#/components/schemas/Links",
"description": "pagination links"
},
"page": {
"description": "the number of the current page",
"format": "int32",
"type": "integer"
},
"per_page": {
"description": "the maximum count of items per page",
"format": "int32",
"type": "integer"
},
"total_items": {
"description": "the total count of found items",
"format": "int64",
"type": "integer"
}
},
"type": "object"
}
}
},
"description": "successful operation"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "authorization failed"
},
"412": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "the current user is not in xTM"
}
},
"security": [
{
"bearerAuth": []
},
{
"basicAuth": []
}
],
"summary": "This end-point allows to list files previously uploaded to the storage.",
"tags": [
"List Files"
]
}
},
"/v1/storage/files/{file_id}": {
"delete": {
"operationId": "deleteStorageFile",
"parameters": [
{
"description": "file id to be deleted",
"explode": false,
"in": "path",
"name": "file_id",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"item": {
"$ref": "#/components/schemas/File",
"description": "The model of the deleted file"
}
},
"type": "object"
}
}
},
"description": "successful operation"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "authorization failed"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "the file either does not exist or has been already deleted"
},
"412": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "the current user is not in xTM"
}
},
"security": [
{
"bearerAuth": []
},
{
"basicAuth": []
}
],
"summary": "This end-point allows to delete files that are accessible for the requester.",
"tags": [
"Delete File"
]
},
"put": {
"operationId": "editStorageFile",
"parameters": [
{
"description": "file id to be edited",
"explode": false,
"in": "path",
"name": "file_id",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"item": {
"$ref": "#/components/schemas/EditableFileProperties",
"description": "the actual file properties"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"changed": {
"description": "True if any of the file fields has been actually changed",
"type": "boolean"
},
"item": {
"$ref": "#/components/schemas/File",
"description": "The model of the changed file"
}
},
"type": "object"
}
}
},
"description": "successful operation"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "if the provided file properties are invalid"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "authorization failed"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "the file either does not exist or has been already deleted"
},
"412": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "the current user is not in xTM"
}
},
"security": [
{
"bearerAuth": []
},
{
"basicAuth": []
}
],
"summary": "This end-point allows to edit files that are accessible for the requester.",
"tags": [
"Edit File"
]
}
},
"/v1/storage/groups": {
"get": {
"operationId": "getStorageGroups",
"parameters": [
{
"description": "one or more group ids to be listed",
"explode": true,
"in": "query",
"name": "group_id",
"required": false,
"schema": {
"items": {
"type": "string"
},
"type": "array"
},
"style": "form"
},
{
"description": "the search term (includes version names, codes, app names, identifiers, file and group names).",
"explode": true,
"in": "query",
"name": "q",
"required": false,
"schema": {
"type": "string"
},
"style": "form"
},
{
"description": "one or more application types",
"explode": true,
"in": "query",
"name": "kind",
"required": false,