/
APIGatewayServiceManagement.json
7378 lines (7378 loc) · 430 KB
/
APIGatewayServiceManagement.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
{
"swagger" : "2.0",
"info" : {
"description" : "API Gateway Service Management Service allows you to manage the APIs in the API Gateway. Any user with the 'Manage APIs' functional privilege can manage the APIs in the API Gateway. By default, the users who are part of either API-Gateway-Providers or API-Gateway-Administrators groups will have this privilege.\n\nAPI Gateway supports four types of APIs - REST APIs, SOAP APIs, WebSocket APIs and OData APIs. REST APIs can be created by providing the swagger (file/url), openAPI (file/url), raml (file/url) or can be created from scratch. SOAP APIs can be created using the WSDL (file/url). If the API definitions has reference schemas, then an archive containing all the definitions can be provided as an input. WebSocket APIs can be created from scratch. OData APIs can be created using their service document or metadata document url.\n\nThis service provides you with the options to create, update, read and delete of all the above API types.\n\nAn API can either be in an Active or an InActive state. An Active state indicates that the API is available for consumers. The users can use this service to activate or deactivate the API. Post activation, API Gateway generates 'Gateway Endpoints' which can be used by the API consumers to access the API. Generally API consumers use their applications to consume the APIs.\n\nThis service can also be used to manage the API Scopes. An API Scope is a collection of resources or operations in the API. Users can create multiple scopes for a single API.\n\nOnce the API is created, users can enforce the access restrictions and other rules on the API by add the policies to the API. Policies can be attached to REST, SOAP and OData APIs. Refer to the Policy Management API documentation for more details on the policies. Refer to the Document Management API documentation for more details on attaching documents to an API.\n\nThis service can also be used to publish/unpublish the APIs to/from a service registry. An API in an active state can be registered (published) to one or more service registries.",
"version" : "11.0",
"title" : "API Gateway Service Management Service"
},
"host" : "localhost:5555",
"basePath" : "/rest/apigateway",
"schemes" : [ "http" ],
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"paths" : {
"/apis" : {
"get" : {
"description" : "Get all APIs or subset of APIs",
"operationId" : "getAPIs",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiIds",
"in" : "query",
"description" : "API Ids for the API to be retrieved",
"required" : false,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864,353bd366-47d4-4703-aecf-9cb40cdcc345"
}, {
"name" : "from",
"in" : "query",
"description" : "Starting index from the list of APIs to be retrieved",
"required" : false,
"type" : "integer"
}, {
"name" : "size",
"in" : "query",
"description" : "Number of APIs to be retrieved",
"required" : false,
"type" : "integer"
} ],
"responses" : {
"200" : {
"description" : "Returns the list of all APIs",
"examples" : {
"application/json" : "{\r\n \"apiResponse\": [\r\n {\r\n \"api\": {\r\n \"apiName\": \"ChuckNorrisAPI\",\r\n \"apiVersion\": \"v2\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"publishedPortals\": [],\r\n \"systemVersion\": 2,\r\n \"id\": \"46df4227-a100-486c-9580-0bf388ec6ec7\"\r\n },\r\n \"responseStatus\": \"SUCCESS\"\r\n },\r\n {\r\n \"api\": {\r\n \"apiName\": \"ChuckNorrisAPI\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"publishedPortals\": [],\r\n \"systemVersion\": 1,\r\n \"id\": \"25fb937a-8360-41ab-8be5-987b14fe631d\"\r\n },\r\n \"responseStatus\": \"SUCCESS\",\r\n \"teams\": [\r\n {\r\n \"id\": \"Administrators\",\r\n \"name\": \"Administrators\",\r\n \"canDelete\": \"false\"\r\n },\r\n {\r\n \"id\": \"Default\",\r\n \"name\": \"Default\",\r\n \"canDelete\": \"true\"\r\n }\r\n ]\r\n }\r\n ]\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponsesModel"
}
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
}
},
"security" : [ {
"Basic" : [ ]
} ]
},
"post" : {
"description" : "This REST operation is used to create an API by importing a file, url or from scratch",
"operationId" : "createAPI",
"consumes" : [ "application/json", "multipart/form-data" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "file",
"in" : "formData",
"description" : "Input swagger / raml / wsdl file to be imported",
"required" : true,
"type" : "file",
"x-example" : "petstore.json"
}, {
"name" : "apiName",
"in" : "formData",
"description" : "Name of the API",
"required" : true,
"type" : "string",
"x-example" : "Swagger Petstore"
}, {
"name" : "apiDescription",
"in" : "formData",
"description" : "Description of the API",
"required" : false,
"type" : "string",
"x-example" : "This is a sample server Petstore server"
}, {
"name" : "apiVersion",
"in" : "formData",
"description" : "Version of the API",
"required" : false,
"type" : "string",
"x-example" : "V1"
}, {
"name" : "type",
"in" : "formData",
"description" : "Input file type",
"required" : true,
"type" : "string",
"x-example" : "swagger",
"enum" : [ "swagger", "raml", "wsdl", "openapi" ]
}, {
"name" : "rootFileName",
"in" : "formData",
"description" : "Name of the main file in the zip. Required only when the input file is zip format",
"required" : false,
"type" : "string",
"x-example" : "mainFile.wsdl"
}, {
"in" : "body",
"name" : "body",
"description" : "API request payload",
"required" : true,
"schema" : {
"$ref" : "#/definitions/InputAPI"
},
"x-examples" : {
"application/json" : "{\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"https://api.chucknorris.io/jokes\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {}\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorris\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"08afbfa9-78e1-4c23-bb19-c0012464047e\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-09-03 11:56:21 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\",\r\n \r\n\t\"teams\": [\r\n\t\t{\r\n\t\t\t\"id\": \"Default\"\r\n\t\t}\r\n\t]\r\n }"
}
} ],
"responses" : {
"200" : {
"description" : "Returns the created API object",
"examples" : {
"application/json" : "{\r\n \"apiResponse\": {\r\n \"api\": {\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"https://api.chucknorris.io/jokes\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {}\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorris\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"08afbfa9-78e1-4c23-bb19-c0012464047e\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-09-03 11:56:21 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n },\r\n \"responseStatus\": \"SUCCESS\",\r\n \"versions\": [\r\n {\r\n \"versionNumber\": \"1.0\",\r\n \"apiId\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n }\r\n ],\r\n \"teams\": [\r\n {\r\n \"id\": \"Administrators\",\r\n \"name\": \"Administrators\",\r\n \"canDelete\": \"false\"\r\n },\r\n {\r\n \"id\": \"Default\",\r\n \"name\": \"Default\",\r\n \"canDelete\": \"true\"\r\n }\r\n ] }\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponseCreate"
}
},
"400" : {
"description" : "This status code shows when the user missed the mandatory fields like type, file/url/apiDefinition in the request or provide a invalid request body"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
}
},
"security" : [ {
"Basic" : [ ]
} ]
},
"delete" : {
"description" : "Delete the inactive APIs",
"operationId" : "deleteAPIs",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiIds",
"in" : "query",
"description" : "API Ids for the APIs to be deleted. Multiple API ids combined by comma",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864,353bd366-47d4-4703-aecf-9cb40cdcc854"
}, {
"name" : "forceDelete",
"in" : "query",
"description" : "Flag for force delete. Required when API is associated with some applications",
"required" : false,
"type" : "boolean",
"default" : true,
"x-example" : true
} ],
"responses" : {
"200" : {
"description" : "Returns the apiId along with the error when unsuccessful",
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/APIResponseDelete"
}
}
},
"204" : {
"description" : "Success"
},
"400" : {
"description" : "This response code returns when the mandatory parameter apiIds is missing in the query parameter"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}" : {
"get" : {
"description" : "Retrieve an API based on the API id.",
"operationId" : "getAPI",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be retrieved",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
}, {
"name" : "format",
"in" : "query",
"description" : "Output format of the API. If the value is 'swagger', you get a API definition in swagger format. If the value is 'raml', you get a raml document. If the value is 'openapi', you get a open API document. If the value is 'odata', you get a zip file holding the OData metadata and service document.",
"required" : false,
"type" : "string",
"x-example" : "raml"
}, {
"name" : "url",
"in" : "query",
"description" : "User selected endpoint for API definition in swagger/raml format.",
"required" : false,
"type" : "string",
"x-example" : "http://hostname:5555/gateway/servicename/1.0"
} ],
"responses" : {
"200" : {
"description" : "If the format is swagger, returns the swagger content in json and raml returns the raml content in yaml. If the format is openapi, returns the open api content in json. If the format is odata, you get a zip file holding the OData metadata and service document.",
"examples" : {
"application/json" : "{\r\n \"apiResponse\": {\r\n \"api\": {\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"https://api.chucknorris.io/jokes\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {}\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorris\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"08afbfa9-78e1-4c23-bb19-c0012464047e\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-09-03 11:56:21 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n },\r\n \"responseStatus\": \"SUCCESS\",\r\n \"versions\": [\r\n {\r\n \"versionNumber\": \"1.0\",\r\n \"apiId\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n \r\n }\r\n ],\r\n \"teams\": [\r\n {\r\n \"id\": \"Administrators\",\r\n \"name\": \"Administrators\",\r\n \"canDelete\": \"false\"\r\n },\r\n {\r\n \"id\": \"Default\",\r\n \"name\": \"Default\",\r\n \"canDelete\": \"true\"\r\n }\r\n ] }\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponseGetAPI"
}
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
},
"put" : {
"description" : "This REST operation is used to update an API by importing a file, url or inline.\n\nWhile updating the API, visibility of the operations can be set by enabling or disabling the operations. Disabled operations will not be exposed to the customers. By default, all the operations are exposed to the consumers.\n\nWhen updating the API using file or url, API Gateway overwrite the resources/operations for the API. But it will retain the maturity state, scopes, visibility and if API mocking is enabled, then default mocked responses, mocked conditions and IS services will also be retained.",
"operationId" : "updateAPI",
"consumes" : [ "application/json", "multipart/form-data" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be updated",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
}, {
"name" : "overwriteTags",
"in" : "query",
"description" : "When an API is updated using a URL / file, the existing tags will be overwritten if this value is true.",
"required" : false,
"type" : "boolean",
"default" : false,
"x-example" : true
}, {
"name" : "file",
"in" : "formData",
"description" : "Input swagger / raml / wsdl file",
"required" : true,
"type" : "file",
"x-example" : "petstore.json"
}, {
"name" : "apiName",
"in" : "formData",
"description" : "Name of the API",
"required" : true,
"type" : "string",
"x-example" : "Swagger Petstore"
}, {
"name" : "apiDescription",
"in" : "formData",
"description" : "Description of the API",
"required" : false,
"type" : "string",
"x-example" : "This is a sample server Petstore server"
}, {
"name" : "apiVersion",
"in" : "formData",
"description" : "Version of the API",
"required" : false,
"type" : "string",
"x-example" : "V1"
}, {
"name" : "type",
"in" : "formData",
"description" : "Input file type",
"required" : true,
"type" : "string",
"x-example" : "swagger",
"enum" : [ "swagger", "raml", "wsdl", "openapi" ]
}, {
"name" : "rootFileName",
"in" : "formData",
"description" : "Name of the main file in the zip. Required when the input file is zip format",
"required" : false,
"type" : "string",
"x-example" : "mainFile.wsdl"
}, {
"in" : "body",
"name" : "body",
"description" : "API request payload",
"required" : true,
"schema" : {
"$ref" : "#/definitions/GatewayAPI"
},
"x-examples" : {
"application/json" : "{\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"https://api.chucknorris.io/jokes\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {}\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorris\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"08afbfa9-78e1-4c23-bb19-c0012464047e\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-09-03 11:56:21 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n }"
}
} ],
"responses" : {
"200" : {
"description" : "Returns the updated API object",
"examples" : {
"application/json" : "{\r\n \"apiResponse\": {\r\n \"api\": {\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"https://api.chucknorris.io/jokes\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {}\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorris\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"08afbfa9-78e1-4c23-bb19-c0012464047e\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-09-03 11:56:21 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n },\r\n \"responseStatus\": \"SUCCESS\",\r\n \"versions\": [\r\n {\r\n \"versionNumber\": \"1.0\",\r\n \"apiId\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n }\r\n ]\r\n }\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponseCreate"
}
},
"400" : {
"description" : "This status code shows when the user missed the mandatory fields like type, file/url/apiDefinition in the request or provide a invalid request body"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
},
"delete" : {
"description" : "Delete the inactive API",
"operationId" : "deleteAPI",
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be deleted",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
}, {
"name" : "forceDelete",
"in" : "query",
"description" : "Flag for force delete. Required when API is associated with some applications",
"required" : false,
"type" : "boolean",
"default" : true,
"x-example" : true
} ],
"responses" : {
"200" : {
"description" : "Returns the apiId along with the error when unsuccessful",
"schema" : {
"$ref" : "#/definitions/APIResponseDelete"
}
},
"204" : {
"description" : "Success"
},
"400" : {
"description" : "This response code returns when the deleted API is published to API portal or in active state"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API"
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/activate" : {
"put" : {
"description" : "Activate an API so that API is exposed to consumers",
"operationId" : "activateAPI",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be activated",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns the API object after successful activation",
"examples" : {
"application/json" : "{\r\n \"apiResponse\": {\r\n \"api\": {\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"https://api.chucknorris.io/jokes\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {}\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorris\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"08afbfa9-78e1-4c23-bb19-c0012464047e\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-09-03 11:56:21 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n },\r\n \"responseStatus\": \"SUCCESS\",\r\n \"versions\": [\r\n {\r\n \"versionNumber\": \"1.0\",\r\n \"apiId\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n }\r\n ]\r\n }\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponse"
}
},
"400" : {
"description" : "This status code shows when the API is already in activated state or when no operations/resources are present or none are enabled"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/applications" : {
"get" : {
"description" : "Retrieves the list of registered applications of an API",
"operationId" : "getApplications",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to find the associated applications",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns the list of associated applications",
"examples" : {
"application/json" : "{\r\n \"applications\": [\r\n {\r\n \"name\": \"app1\",\r\n \"description\": null,\r\n \"contactEmails\": [],\r\n \"identifiers\": [],\r\n \"siteURLs\": [],\r\n \"version\": \"1.0\",\r\n \"id\": \"ae48cd69-421e-4bdf-a4d0-e86996a78f68\",\r\n \"created\": \"2017-03-13 13:12:03 GMT\",\r\n \"lastupdated\": null,\r\n \"consumingAPIs\": [\r\n \"25fb937a-8360-41ab-8be5-987b14fe631d\"\r\n ],\r\n \"accessTokens\": {\r\n \"apiAccessKey_credentials\": {\r\n \"apiAccessKey\": \"cec4b46b-3569-4f73-a561-172dd67c182a\",\r\n \"expirationInterval\": null\r\n },\r\n \"oauth_credentials\": {\r\n \"clientID\": \"40b78ed3-d171-4bd3-99db-51dd2fa71753\",\r\n \"clientSecret\": \"024b9525-6526-45c8-a66c-d192442064e1\",\r\n \"clientName\": \"app1-6b753c2a-0567-462d-a4ea-1b143ab7a381\",\r\n \"scopes\": [\r\n \"25fb937a-8360-41ab-8be5-987b14fe631d\"\r\n ],\r\n \"token_lifetime\": \"3600\",\r\n \"token_refresh_limit\": \"0\",\r\n \"redirect_uris\": [\r\n \"https://placeholder_redirect_uri\"\r\n ],\r\n \"Type\": \"confidential\"\r\n }\r\n }\r\n }\r\n ]\r\n}"
},
"schema" : {
"$ref" : "#/definitions/ApplicationList"
}
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/deactivate" : {
"put" : {
"description" : "Deactivate an API so that API is not exposed to consumers",
"operationId" : "deactivateAPI",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be deactivated",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns the API object after successful deactivation",
"examples" : {
"application/json" : "{\r\n \"apiResponse\": {\r\n \"api\": {\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"https://api.chucknorris.io/jokes\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {}\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorris\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"08afbfa9-78e1-4c23-bb19-c0012464047e\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-09-03 11:56:21 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n },\r\n \"responseStatus\": \"SUCCESS\",\r\n \"versions\": [\r\n {\r\n \"versionNumber\": \"1.0\",\r\n \"apiId\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\"\r\n }\r\n ]\r\n }\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponse"
}
},
"400" : {
"description" : "This status code shows when the API is already in de-activated state"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/gatewayEndpoints" : {
"put" : {
"description" : "This operation can be used to create / update / delete a custom gateway endpoing of an API",
"operationId" : "gatewayEndpoints",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be updated",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
}, {
"in" : "body",
"name" : "body",
"description" : "API Gateway endpoints request payload",
"required" : true,
"schema" : {
"$ref" : "#/definitions/InputGatewayEndpoints"
},
"x-examples" : {
"application/json" : "{\r\n\t \"gatewayEndpoints\": {\r\n\t \"add\": { \r\n\t \"endpointName\" : \"name\", \r\n\t \"gatewayEndpoint\":\"/prefix/${apiName}/${apiVersion}\" \r\n\t },\r\n\t \"update\": { \r\n\t \"oldEndpointName\" : \"oldName\", \r\n\t \"newEndpointName\" : \"newName\", \r\n\t \"gatewayEndpoint\" :\"/newPrefix/chocolateApi/${apiVersion}\" \r\n\t },\r\n\t \"remove\": { \r\n\t \"endpointName\":\"nameOfAnExistingEndpoint\"\r\n\t }\r\n\t }\r\n\t }"
}
} ],
"responses" : {
"200" : {
"description" : "Returns status of the operation along with request payload",
"schema" : {
"$ref" : "#/definitions/APIResponse"
}
},
"400" : {
"description" : "This status code shows when the user provide an invalid request body"
},
"401" : {
"description" : ""
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/globalPolicies" : {
"get" : {
"description" : "Retrieves the list of active global policies applicable to this API",
"operationId" : "getAssociatedGlobalPolicies",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to find the list of applicable global policies",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns the list of global policy names",
"examples" : {
"application/json" : "{\r\n \"globalPolicies\": [\r\n \"GlobalLogInvocationPolicy\"\r\n ]\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponseGetGlobalPolicies"
}
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/implementation" : {
"put" : {
"description" : "This operation can be used to update an API with its implementation endpoints details and optionally the corresponding maturity state after the implementation has been completed",
"operationId" : "notifyAPIImplementation",
"consumes" : [ "multipart/form-data" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be updated",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
}, {
"in" : "body",
"name" : "body",
"description" : "API publish request payload",
"required" : true,
"schema" : {
"$ref" : "#/definitions/InputAPIImplementation"
},
"x-examples" : {
"application/json" : "{ \r\n\t\"nativeBaseURLs\" : [\"https://localhost:5556/restv2/calc/v1\", \"http://localhost:5555/restv2/calc/v1\"], \r\n\t\"maturityState\" : \"Implemented\"\r\n}"
}
} ],
"responses" : {
"200" : {
"description" : "Returns the updated API object",
"schema" : {
"$ref" : "#/definitions/APIResponse"
}
},
"400" : {
"description" : "This status code shows when the user missed the mandatory fields like type, file/url/apiDefinition in the request or provide a invalid request body"
},
"401" : {
"description" : ""
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/mock/disable" : {
"put" : {
"description" : "Once API is disabled from mocking capability, at runtime all the API invocations are redirected to the native service instead of sending the mocked response",
"operationId" : "disableMockAPI",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be deactivated",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns the API object after successful disabling mocking of an API",
"examples" : {
"application/json" : "{\r\n \"apiResponse\": {\r\n \"api\": {\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"API to demonstrate mocking functionality in international developers day\",\r\n \"version\": \"v1\",\r\n \"title\": \"API_MOCKING\"\r\n },\r\n \"host\": \"localhost\",\r\n \"schemes\": [\r\n \"http\"\r\n ],\r\n \"consumes\": [\r\n \"application/json\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/conditionBasedMockedResponse\": {\r\n \"post\": {\r\n \"summary\": \"Configure condition and mocked response\",\r\n \"operationId\": \"conditionBasedMockedResponse\",\r\n \"produces\": [\r\n \"text/plain\"\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"200 response\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"example\": \"No condition evaluates to true. \\nSo API-Gateway sent this default response.\"\r\n }\r\n }\r\n }\r\n },\r\n \"mockedResponses\": {\r\n \"200\": {\r\n \"responseBody\": {\r\n \"text/plain\": \"No condition evaluates to true. \\nSo API-Gateway sent this default response.\"\r\n }\r\n }\r\n },\r\n \"enabled\": true\r\n },\r\n \"parameters\": [],\r\n \"displayName\": \"/conditionBasedMockedResponse\",\r\n \"enabled\": true\r\n },\r\n \"/customESBMockedResponse\": {\r\n \"post\": {\r\n \"summary\": \"Configure custom ESB mocked response\",\r\n \"operationId\": \"customESBMockedResponse\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"200 response\"\r\n }\r\n },\r\n \"mockedResponses\": {\r\n \"200\": {\r\n \"responseBody\": {\r\n \"application/json\": \"\"\r\n }\r\n }\r\n },\r\n \"enabled\": true\r\n },\r\n \"parameters\": [],\r\n \"displayName\": \"/customESBMockedResponse\",\r\n \"enabled\": true\r\n },\r\n \"/dynamicMockedResponse\": {\r\n \"post\": {\r\n \"summary\": \"Dynamic mocked response set\",\r\n \"operationId\": \"dynamicMockedResponse\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"200 response\"\r\n }\r\n },\r\n \"mockedResponses\": {\r\n \"200\": {\r\n \"responseBody\": {\r\n \"application/json\": \"\"\r\n }\r\n }\r\n },\r\n \"enabled\": true\r\n },\r\n \"parameters\": [],\r\n \"displayName\": \"/dynamicMockedResponse\",\r\n \"enabled\": true\r\n },\r\n \"/staticMockedResponse\": {\r\n \"post\": {\r\n \"summary\": \"Default mocked response from example\",\r\n \"operationId\": \"generateFromExample\",\r\n \"produces\": [\r\n \"application/json\",\r\n \"application/xml\"\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"200 response generated from example\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"example\": \"{\\\"resource\\\" : \\\"/generateFromExample\\\",\\\"description\\\" : \\\"Default mocked response from example for status code 200\\\"}\"\r\n },\r\n \"application/xml\": {\r\n \"example\": \"<root><resource>/generateFromExample</resource><description>Default mocked response from example for status code 200</description></root>\"\r\n }\r\n }\r\n },\r\n \"201\": {\r\n \"description\": \"201 response generated from schema\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/Pet\"\r\n }\r\n },\r\n \"application/xml\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/Pet\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"mockedResponses\": {\r\n \"200\": {\r\n \"responseBody\": {\r\n \"application/json\": \"{\\\"resource\\\" : \\\"/generateFromExample\\\",\\\"description\\\" : \\\"Default mocked response from example for status code 200\\\"}\",\r\n \"application/xml\": \"<root><resource>/generateFromExample</resource><description>Default mocked response from example for status code 200</description></root>\"\r\n }\r\n },\r\n \"201\": {\r\n \"responseBody\": {\r\n \"application/json\": \"{\\\"birthday\\\":2059397944,\\\"name\\\":\\\"\\\"}\",\r\n \"application/xml\": \"<birthday>921604684</birthday><name/>\"\r\n }\r\n }\r\n },\r\n \"enabled\": true\r\n },\r\n \"parameters\": [],\r\n \"displayName\": \"/staticMockedResponse\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"http://localhost\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {\r\n \"Pet\": {\r\n \"required\": [\r\n \"name\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"birthday\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n },\r\n \"name\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"http://localhost\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"APIMocking\",\r\n \"apiVersion\": \"v1\",\r\n \"apiDescription\": \"API to demonstrate mocking functionality in international developers day\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"19773e29-2838-4efc-aa04-793b48f4d22b\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-11-01 13:44:58 GMT\",\r\n \"systemVersion\": 1,\r\n \"mockService\": {\r\n \"enableMock\": false\r\n },\r\n \"id\": \"afd8eb5e-bba8-447b-8e28-76aac23ba074\"\r\n },\r\n \"responseStatus\": \"SUCCESS\",\r\n \"versions\": [\r\n {\r\n \"versionNumber\": \"v1\",\r\n \"apiId\": \"afd8eb5e-bba8-447b-8e28-76aac23ba074\"\r\n }\r\n ]\r\n }\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponse"
}
},
"400" : {
"description" : "This status code shows when the API is already in activated state or in mocked state"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/mock/enable" : {
"put" : {
"description" : "In API Gateway, you can mock an API implementation. API Gateway lets you mock an API by simulating the native service. API Mocking is useful feature in API first approach, where in the provider may choose to expose the mocked API to the consumers when the actual API doesn't exist or isn't complete. \n In API Gateway, when you enable mocking for an API, a default mock response is created for each combination of resource, operation, status code and content-type based on the example and schema set in the API definition. As an API Provider, you can add or modify the default mock responses.\n\nYou can specify conditions at the operation level and configure IS services at the API level for a mocked API in the update API operation. At runtime, when the mocked API is invoked instead of calling the native service, API Gateway returns the mocked response to the consumer based on the below priorities:\n1. If any of the conditions for the invoked operation satisfies, API Gateway returns the associated mocked response.\n2. If no condition is specified or none of the condition for the invoked operation is satisfied, then API Gateway will return \na. the response from an IS service, if an IS service is configured b. default mocked response, if no IS services are configured",
"operationId" : "enableMockAPI",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be activated",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
}, {
"name" : "retainDefaultMockResponses",
"in" : "query",
"description" : "Flag to retain generated mocked responses. When this is set to true, default mocked responses will be retained. If it's set to false, new default mocked responses will be generated using the examples, schema in the API",
"required" : false,
"type" : "boolean",
"default" : false,
"x-example" : true
} ],
"responses" : {
"200" : {
"description" : "Returns the API object after successfully enabling mocking of an API",
"examples" : {
"application/json" : "{\r\n \"apiResponse\": {\r\n \"api\": {\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"API to demonstrate mocking functionality in international developers day\",\r\n \"version\": \"v1\",\r\n \"title\": \"API_MOCKING\"\r\n },\r\n \"host\": \"localhost\",\r\n \"schemes\": [\r\n \"http\"\r\n ],\r\n \"consumes\": [\r\n \"application/json\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/conditionBasedMockedResponse\": {\r\n \"post\": {\r\n \"summary\": \"Configure condition and mocked response\",\r\n \"operationId\": \"conditionBasedMockedResponse\",\r\n \"produces\": [\r\n \"text/plain\"\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"200 response\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"example\": \"No condition evaluates to true. \\nSo API-Gateway sent this default response.\"\r\n }\r\n }\r\n }\r\n },\r\n \"mockedResponses\": {\r\n \"200\": {\r\n \"responseBody\": {\r\n \"text/plain\": \"No condition evaluates to true. \\nSo API-Gateway sent this default response.\"\r\n }\r\n }\r\n },\r\n \"enabled\": true\r\n },\r\n \"parameters\": [],\r\n \"displayName\": \"/conditionBasedMockedResponse\",\r\n \"enabled\": true\r\n },\r\n \"/customESBMockedResponse\": {\r\n \"post\": {\r\n \"summary\": \"Configure custom ESB mocked response\",\r\n \"operationId\": \"customESBMockedResponse\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"200 response\"\r\n }\r\n },\r\n \"mockedResponses\": {\r\n \"200\": {\r\n \"responseBody\": {\r\n \"application/json\": \"\"\r\n }\r\n }\r\n },\r\n \"enabled\": true\r\n },\r\n \"parameters\": [],\r\n \"displayName\": \"/customESBMockedResponse\",\r\n \"enabled\": true\r\n },\r\n \"/dynamicMockedResponse\": {\r\n \"post\": {\r\n \"summary\": \"Dynamic mocked response set\",\r\n \"operationId\": \"dynamicMockedResponse\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"200 response\"\r\n }\r\n },\r\n \"mockedResponses\": {\r\n \"200\": {\r\n \"responseBody\": {\r\n \"application/json\": \"\"\r\n }\r\n }\r\n },\r\n \"enabled\": true\r\n },\r\n \"parameters\": [],\r\n \"displayName\": \"/dynamicMockedResponse\",\r\n \"enabled\": true\r\n },\r\n \"/staticMockedResponse\": {\r\n \"post\": {\r\n \"summary\": \"Default mocked response from example\",\r\n \"operationId\": \"generateFromExample\",\r\n \"produces\": [\r\n \"application/json\",\r\n \"application/xml\"\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"200 response generated from example\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"example\": \"{\\\"resource\\\" : \\\"/generateFromExample\\\",\\\"description\\\" : \\\"Default mocked response from example for status code 200\\\"}\"\r\n },\r\n \"application/xml\": {\r\n \"example\": \"<root><resource>/generateFromExample</resource><description>Default mocked response from example for status code 200</description></root>\"\r\n }\r\n }\r\n },\r\n \"201\": {\r\n \"description\": \"201 response generated from schema\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/Pet\"\r\n }\r\n },\r\n \"application/xml\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/Pet\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"mockedResponses\": {\r\n \"200\": {\r\n \"responseBody\": {\r\n \"application/json\": \"{\\\"resource\\\" : \\\"/generateFromExample\\\",\\\"description\\\" : \\\"Default mocked response from example for status code 200\\\"}\",\r\n \"application/xml\": \"<root><resource>/generateFromExample</resource><description>Default mocked response from example for status code 200</description></root>\"\r\n }\r\n },\r\n \"201\": {\r\n \"responseBody\": {\r\n \"application/json\": \"{\\\"birthday\\\":2059397944,\\\"name\\\":\\\"\\\"}\",\r\n \"application/xml\": \"<birthday>921604684</birthday><name/>\"\r\n }\r\n }\r\n },\r\n \"enabled\": true\r\n },\r\n \"parameters\": [],\r\n \"displayName\": \"/staticMockedResponse\",\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"http://localhost\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {\r\n \"Pet\": {\r\n \"required\": [\r\n \"name\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"birthday\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n },\r\n \"name\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"http://localhost\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"APIMocking\",\r\n \"apiVersion\": \"v1\",\r\n \"apiDescription\": \"API to demonstrate mocking functionality in international developers day\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"19773e29-2838-4efc-aa04-793b48f4d22b\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-11-01 13:44:58 GMT\",\r\n \"systemVersion\": 1,\r\n \"mockService\": {\r\n \"enableMock\": true\r\n },\r\n \"id\": \"afd8eb5e-bba8-447b-8e28-76aac23ba074\"\r\n },\r\n \"responseStatus\": \"SUCCESS\",\r\n \"versions\": [\r\n {\r\n \"versionNumber\": \"v1\",\r\n \"apiId\": \"afd8eb5e-bba8-447b-8e28-76aac23ba074\"\r\n }\r\n ]\r\n }\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponse"
}
},
"400" : {
"description" : "This status code shows when the API is already in activated state or when invalid json or xml is provided in the example part of the operation"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/packages" : {
"get" : {
"description" : "Retrieves the list of packages of an API",
"operationId" : "getPackagesForAPI",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to find the associated packages",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns the list of associated packages",
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Package"
}
}
},
"401" : {
"description" : ""
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/providerspecification" : {
"get" : {
"description" : "Downloads the provider specification of REST, SOAP and GraphQL based APIs. Provider specification is nothing but, the specification file (in swagger, graphql or wsdl format) with out the concrete API Gateway endpoint and contains all resources/methods/operation irrespective of whether they are exposed to consumer",
"operationId" : "downloadProviderSpecification",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to retrieve the versions",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
}, {
"name" : "format",
"in" : "query",
"description" : "Output format of the API specification. For REST APIs the value is 'swagger'; for SOAP APIs use the value as 'wsdl';for GraphQL APIs use the value as 'graphql'",
"required" : true,
"type" : "string",
"x-example" : "swagger",
"enum" : [ "swagger", "wsdl" ]
} ],
"responses" : {
"200" : {
"description" : "If the format is swagger, returns the swagger content in json. If the format is wsdl, returns the wsdl content in xml. If the format is graphql, returns the GraphQL schema content in graphql",
"schema" : {
"$ref" : "#/definitions/APIResponseGetAPI"
}
},
"401" : {
"description" : ""
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/publish" : {
"put" : {
"description" : "This REST operation is used to publish API to the registered API Portal",
"operationId" : "publishAPI",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to be published",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
}, {
"in" : "body",
"name" : "body",
"description" : "API publish request payload",
"required" : true,
"schema" : {
"$ref" : "#/definitions/InputPublish"
},
"x-examples" : {
"application/json" : "{\r\n\t\"portalGatewayId\" : \"69bac781-6c60-4db3-86f7-50af3ec4963a\",\r\n\t\"communities\" : [\"3bdf8005-5685-3ef5-b132-de4681963fb6\"],\r\n\t\"endpoints\" : [\"https://api.chucknorris.io/jokes\"]\r\n}"
}
} ],
"responses" : {
"200" : {
"description" : "Returns the API object after successful publish",
"examples" : {
"application/json" : "{\r\n \"apiResponse\": {\r\n \"api\": {\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"vendorExtensions\": {},\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"parameters\": [],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"definitions\": {}\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorrisAPI\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"879068cd-8628-4f2a-b903-4e6613ca12ba\"\r\n ],\r\n \"referencedFiles\": {\r\n \"ChuckNorrisAPI.json\": \"{\\r\\n \\\"swagger\\\": \\\"2.0\\\",\\r\\n \\\"info\\\": {\\r\\n \\\"description\\\": \\\"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\\\",\\r\\n \\\"title\\\": \\\"ChuckNorrisAPI\\\",\\r\\n \\\"version\\\": \\\"1.0\\\"\\r\\n },\\r\\n \\\"host\\\": \\\"api.chucknorris.io\\\",\\r\\n \\\"basePath\\\": \\\"/jokes\\\",\\r\\n \\\"schemes\\\": [\\r\\n \\\"https\\\"\\r\\n ],\\r\\n \\\"paths\\\": {\\r\\n \\\"/random\\\": {\\r\\n \\\"get\\\": {\\r\\n \\\"summary\\\": \\\"GET\\\",\\r\\n \\\"deprecated\\\": false,\\r\\n \\\"produces\\\": [\\r\\n \\\"application/json\\\"\\r\\n ],\\r\\n \\\"description\\\": \\\"\\\",\\r\\n \\\"operationId\\\": \\\"GET\\\"\\r\\n }\\r\\n }\\r\\n }\\r\\n}\\r\\n\"\r\n },\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2017-03-13 09:38:30 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"25fb937a-8360-41ab-8be5-987b14fe631d\",\r\n \"oauth2ScopeName\": \"25fb937a-8360-41ab-8be5-987b14fe631d\"\r\n },\r\n \"responseStatus\": \"SUCCESS\"\r\n }\r\n}"
},
"schema" : {
"$ref" : "#/definitions/APIResponseCreate"
}
},
"400" : {
"description" : "This status code shows when the user missed the mandatory portalGatewayId or invalid portalGatewayId in the request body"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/scopes" : {
"get" : {
"description" : "An API Scope is a collection of resources or operations in an API. Users can create multiple scopes for a single API. Policies can be attached to an API level or scope level. This method retrieves the scopes of an API.\n\nYou can create, modify or delete the scopes in the update API operation using PUT /api/{apiId}",
"operationId" : "getScopes",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to retrieve the versions",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns API scopes",
"examples" : {
"application/json" : "{\r\n \"scopeReferences\": [\r\n {\r\n \"references\": [\r\n {\r\n \"resourcePath\": \"/random\",\r\n \"supportedOperations\": []\r\n }\r\n ],\r\n \"scope\": {\r\n \"name\": \"Get_Scopes\",\r\n \"description\": \"Dummy description of the scope\",\r\n \"policies\": [\r\n \"db1a42f4-e038-4a1b-82f4-8fee6fbd5687\"\r\n ]\r\n }\r\n }\r\n ]\r\n}"
},
"schema" : {
"$ref" : "#/definitions/ScopeReferences"
}
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/scopes/{scopeName}" : {
"get" : {
"description" : "Retrieve scopes of an API based on the scope name",
"operationId" : "getScopeByScopeName",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to retrieve the versions",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
}, {
"name" : "scopeName",
"in" : "path",
"description" : "Name of the scope",
"required" : true,
"type" : "string",
"x-example" : "getScope"
} ],
"responses" : {
"200" : {
"description" : "Returns API scopes",
"examples" : {
"application/json" : "{\r\n \"scopeReferences\": [\r\n {\r\n \"references\": [\r\n {\r\n \"resourcePath\": \"/random\",\r\n \"supportedOperations\": []\r\n }\r\n ],\r\n \"scope\": {\r\n \"name\": \"Get_Scopes\",\r\n \"description\": \"Dummy description of the scope\",\r\n \"policies\": [\r\n \"db1a42f4-e038-4a1b-82f4-8fee6fbd5687\"\r\n ]\r\n }\r\n }\r\n ]\r\n}"
},
"schema" : {
"$ref" : "#/definitions/ScopeReferences"
}
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway or scopeName is not found in the list of scopes"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/source" : {
"get" : {
"description" : "Download the API definition that was used to create the API. This is applicable only for SOAP APIs.",
"operationId" : "getSource",
"produces" : [ "multipart/mixed" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API to download the source content",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns the source files along with the root file name",
"examples" : {
"multipart/mixed" : "Message-ID: <296841806.5.1489555643275.JavaMail.MRIZ@MCMRIZ01>\r\nMIME-Version: 1.0\r\nContent-Type: multipart/mixed; \r\n\tboundary=\"----=_Part_4_1098332532.1489555643274\"\r\n\r\n------=_Part_4_1098332532.1489555643274\r\ncontent-type: application/zip\r\nContent-Disposition: attachment; filename=\"echoService.zip\"\r\n\r\nfile content in zip format\r\n------=_Part_4_1098332532.1489555643274\r\ncontent-type: text/plain\r\nContent-Disposition: inline; name=\"rootFileName\"\r\n\r\necho.wsdl\r\n------=_Part_4_1098332532.1489555643274--"
},
"schema" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Multipart"
}
}
},
"400" : {
"description" : "This status code returns when the specified API is not a SOAP API"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/tracing/disable" : {
"put" : {
"description" : "Disable tracing for an API",
"operationId" : "disableTracing",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id for the API for which tracing is disabled",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns the API object after disabling tracing for an API",
"examples" : {
"application/json" : "{\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"https://api.chucknorris.io/jokes\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {}\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorris\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"08afbfa9-78e1-4c23-bb19-c0012464047e\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-09-03 11:56:21 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\",\r\n \"tracingEnabled\": \"false\" }"
},
"schema" : {
"$ref" : "#/definitions/GatewayAPI"
}
},
"400" : {
"description" : "This status code shows when there is error while disabling tracing"
},
"401" : {
"description" : "This status code indicates that either user didn't provide right credentials or user doesn't have required privileges to access this API."
},
"404" : {
"description" : "This status code indicates that the apiId specified is not found in the API Gateway"
}
},
"security" : [ {
"Basic" : [ ]
} ]
}
},
"/apis/{apiId}/tracing/enable" : {
"put" : {
"description" : "Enable tracing for an API",
"operationId" : "tracingEnable",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "apiId",
"in" : "path",
"description" : "API Id of the API for which tracing should be enabled.",
"required" : true,
"type" : "string",
"x-example" : "353bd366-47d4-4703-aecf-9cb40cdcc864"
} ],
"responses" : {
"200" : {
"description" : "Returns the API object after successfully enabling tracing",
"examples" : {
"application/json" : "{\r\n \"apiDefinition\": {\r\n \"type\": \"rest\",\r\n \"info\": {\r\n \"description\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"version\": \"1.0\",\r\n \"title\": \"ChuckNorrisAPI\"\r\n },\r\n \"host\": \"api.chucknorris.io\",\r\n \"basePath\": \"/jokes\",\r\n \"schemes\": [\r\n \"https\"\r\n ],\r\n \"security\": [],\r\n \"paths\": {\r\n \"/random\": {\r\n \"get\": {\r\n \"summary\": \"GET\",\r\n \"description\": \"\",\r\n \"operationId\": \"GET\",\r\n \"produces\": [\r\n \"application/json\"\r\n ],\r\n \"responses\": {},\r\n \"enabled\": true\r\n },\r\n \"enabled\": true\r\n }\r\n },\r\n \"securityDefinitions\": {},\r\n \"definitions\": {},\r\n \"baseUriParameters\": [],\r\n \"externalDocs\": [],\r\n \"servers\": [\r\n {\r\n \"url\": \"https://api.chucknorris.io/jokes\"\r\n }\r\n ],\r\n \"components\": {\r\n \"schemas\": {}\r\n }\r\n },\r\n \"nativeEndpoint\": [\r\n {\r\n \"passSecurityHeaders\": true,\r\n \"uri\": \"https://api.chucknorris.io/jokes\",\r\n \"connectionTimeoutDuration\": 0,\r\n \"alias\": false\r\n }\r\n ],\r\n \"apiName\": \"ChuckNorris\",\r\n \"apiVersion\": \"1.0\",\r\n \"apiDescription\": \"Chuck Norris facts are satirical factoids about martial artist and actor Chuck Norris that have become an Internet phenomenon and as a result have become widespread in popular culture. The 'facts' are normally absurd hyperbolic claims about Norris' toughness, attitude, virility, sophistication, and masculinity.\",\r\n \"maturityState\": \"Beta\",\r\n \"isActive\": false,\r\n \"type\": \"REST\",\r\n \"owner\": \"Administrator\",\r\n \"policies\": [\r\n \"08afbfa9-78e1-4c23-bb19-c0012464047e\"\r\n ],\r\n \"scopes\": [],\r\n \"publishedPortals\": [],\r\n \"creationDate\": \"2018-09-03 11:56:21 GMT\",\r\n \"systemVersion\": 1,\r\n \"id\": \"badc18e6-446f-4aa3-96cd-33e46bd40fb5\",\r\n \"tracingEnabled\": \"true\" }"
},
"schema" : {
"$ref" : "#/definitions/GatewayAPI"
}