/
openapi-apis.yaml
6499 lines (6316 loc) · 248 KB
/
openapi-apis.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: Gravitee.io APIM - Management API - APIs
description: |-
This is the OpenAPI specification for our new version of APIM Management API.
contact:
email: team-apim@graviteesource.com
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 2.0.0
security:
- BasicAuth: []
- CookieAuth: []
servers:
- url: "{protocol}://{managementAPIHost}/management/v2"
description: APIM Management API v2 - Default base URL
variables:
protocol:
description: The protocol you want to use to communicate with the mAPI
default: https
enum:
- https
- http
managementAPIHost:
description: The domain of the server hosting your Management API
default: localhost:8083
- url: "{protocol}://{managementAPIHost}/management/v2/organizations/{orgId}"
description: APIM Management API v2 - Base URL to target specific organizations
variables:
protocol:
description: The protocol you want to use to communicate with the mAPI
default: https
enum:
- https
- http
managementAPIHost:
description: The domain of the server hosting your Management API
default: localhost:8083
orgId:
description: The unique ID of your organization
default: DEFAULT
tags:
- name: APIs
description: Everything about APIs
- name: API Documentation
description: Everything about API documentation pages
- name: API Members
description: Everything about API members
- name: API Plans
description: Everything about API plans
- name: API Subscriptions
description: Everything about API subscriptions
- name: Groups
description: Everything about groups
- name: Integration
description: Everything about integration
paths:
# APIs
/environments/{envId}/apis:
parameters:
- $ref: "#/components/parameters/envIdParam"
get:
parameters:
- $ref: "#/components/parameters/pageParam"
- $ref: "#/components/parameters/perPageParam"
- $ref: "#/components/parameters/apiExpandsParam"
tags:
- APIs
summary: List APIs
description: |-
Get the list of APIs for a specific environment.<br>
The results are paginated.
User must have the ENVIRONMENT_API[READ] permission.
operationId: listApis
responses:
"200":
$ref: "#/components/responses/ApisResponse"
default:
$ref: "#/components/responses/Error"
post:
tags:
- APIs
summary: Create an API
description: |-
⚠️ Support only v4 API for the moment. ⚠️<br>
Create a new API.
User must have the ENVIRONMENT_API[CREATE] permission.
operationId: createApi
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateApiV4"
required: true
responses:
"201":
description: API successfully created
content:
application/json:
schema:
$ref: "#/components/schemas/ApiV4"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/_import/definition:
parameters:
- $ref: "#/components/parameters/envIdParam"
post:
tags:
- APIs
summary: Import API definition
description: |-
⚠️ Support only v4 API for the moment. ⚠️<br>
Create an API by importing an API definition. <br>
This definition can be retrieved from `GET /environments/{envId}/apis/{apiId}/_export/definition`
User must have the ENVIRONMENT_API[CREATE] permission.
operationId: createApiWithImportDefinition
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ExportApiV4"
required: true
responses:
"201":
description: API successfully created
content:
application/json:
schema:
$ref: "#/components/schemas/ApiV4"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/_search:
parameters:
- $ref: "#/components/parameters/envIdParam"
post:
parameters:
- $ref: "#/components/parameters/pageParam"
- $ref: "#/components/parameters/perPageParam"
- $ref: "#/components/parameters/apiSortByParam"
- $ref: "#/components/parameters/apiExpandsParam"
tags:
- APIs
summary: Search APIs
description: |-
Search APIs for a specific environment.<br>
The results are paginated and can be sorted.
User must have the ENVIRONMENT_API[READ] permission.
operationId: searchApis
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ApiSearchQuery"
required: true
responses:
"200":
$ref: "#/components/responses/ApisResponse"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/_verify/paths:
parameters:
- $ref: "#/components/parameters/envIdParam"
post:
parameters:
- $ref: "#/components/parameters/envIdParam"
tags:
- APIs
summary: Verify HTTP API paths
description: |-
Verify paths before creating or updating a HTTP API.<br>
This will check paths and hosts (depending on environment domain restrictions), and will check that path is not already used by other APIs in the environment.<br>
The result will indicate if the paths are OK, and give the reason of the failure if they are not (path contains invalid chars, path is already covered by another API,...)
operationId: verifyPaths
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/VerifyApiPaths"
required: true
responses:
"200":
$ref: "#/components/responses/VerifyApiPathsResponse"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/_verify/hosts:
parameters:
- $ref: "#/components/parameters/envIdParam"
post:
parameters:
- $ref: "#/components/parameters/envIdParam"
tags:
- APIs
summary: Verify TCP API hosts
description: |-
Verify hosts before creating or updating a TCP API.<br>
This will check it is not already used by other APIs in the environment.<br>
The result will indicate if the hists are OK, and give the reason of the failure if they are not.
operationId: verifyHosts
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/VerifyApiHosts"
required: true
responses:
"200":
$ref: "#/components/responses/VerifyApiHostsResponse"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
get:
tags:
- APIs
summary: Get a specific API
description: |-
Get a specific API.
User must have at least one management (create, update, or delete) permission on the API to access it.
operationId: getApi
responses:
"200":
description: API found
content:
application/json:
schema:
$ref: "#/components/schemas/Api"
default:
$ref: "#/components/responses/Error"
put:
tags:
- APIs
summary: Update an API
description: |-
Update a V2 or a V4 API.
User must have API_DEFINITION[UPDATE] or API_GATEWAY_DEFINITION[UPDATE] permissions.
operationId: updateApi
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateApi"
required: true
responses:
"200":
description: API successfully updated
content:
application/json:
schema:
$ref: "#/components/schemas/Api"
default:
$ref: "#/components/responses/Error"
delete:
parameters:
- name: closePlans
in: query
required: false
description: |-
Set to true to force deletion by closing API plans.<br>
⚠️ Closed plans can't be reopened and every active subscriptions will also be closed. ⚠️
schema:
type: boolean
tags:
- APIs
summary: Delete an API
description: |-
Delete a V2 or a V4 API.
User must have API_DEFINITION[DELETE] permission.
operationId: deleteApi
responses:
"204":
description: API successfully deleted
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/background:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
get:
tags:
- APIs
summary: Get an API's background picture
description: |-
Get the API's background picture.
User must have the API_DEFINITION[READ] permission.
operationId: getApiBackground
responses:
"200":
$ref: "#/components/responses/ImageResponse"
default:
$ref: "#/components/responses/Error"
put:
tags:
- APIs
summary: Update an API's background
description: |-
Update the API's background.
User must have the API_DEFINITION[UPDATE] permission.
operationId: updateApiBackground
requestBody:
content:
image/*:
schema:
type: string
format: binary
responses:
"204":
description: API background successfully updated
default:
$ref: "#/components/responses/Error"
delete:
tags:
- APIs
summary: Delete an API's background
description: |-
Delete the API's background.
User must have the API_DEFINITION[UPDATE] permission.
operationId: deleteApiBackground
responses:
"204":
description: API background successfully deleted.
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/deployments:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
post:
tags:
- APIs
summary: Request a deployment to gateway instances
description: |-
Request a deployment for a given API. <br>
An optional deployment label can be given to the requested deployment.
User must have the API_DEFINITION[UPDATE] permission.
operationId: createApiDeployment
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ApiDeployment"
responses:
"202":
description: API deployment request received
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/deployments/_verify:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
post:
tags:
- API Subscriptions
summary: Check if a deployment is possible
description: |-
Check if an API deployment is possible given the API's definition and license used by the organization.
User must have the API_DEFINITION[READ] permission.
operationId: verifyApiDeployment
responses:
"200":
description: Verification successfully performed.
content:
application/json:
schema:
$ref: "#/components/schemas/VerifyApiDeploymentResponse"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/picture:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
get:
tags:
- APIs
summary: Get an API's picture
description: |-
Get the API's picture.
User must have the API_DEFINITION[READ] permission.
operationId: getApiPicture
responses:
"200":
$ref: "#/components/responses/ImageResponse"
default:
$ref: "#/components/responses/Error"
put:
tags:
- APIs
summary: Update an API's picture
description: |-
Update the API's picture.
User must have the API_DEFINITION[UPDATE] permission.
operationId: updateApiPicture
requestBody:
content:
image/*:
schema:
type: string
format: binary
responses:
"204":
description: API picture successfully updated
default:
$ref: "#/components/responses/Error"
delete:
tags:
- APIs
summary: Delete an API's picture
description: |-
Delete the API's picture.
User must have the API_DEFINITION[UPDATE] permission.
operationId: deleteApiPicture
responses:
"204":
description: API picture successfully deleted.
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/metadata:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
get:
parameters:
- $ref: "#/components/parameters/pageParam"
- $ref: "#/components/parameters/perPageParam"
- $ref: "#/components/parameters/apiMetadataSourceParam"
- $ref: "#/components/parameters/apiMetadataSortByParam"
tags:
- APIs
summary: Get metadata pertaining to API
description: |-
Get the metadata that pertains to an API. Can be global and API metadata.
User must have the API_METADATA[READ] permission.
operationId: getApiMetadata
responses:
"200":
$ref: "#/components/responses/MetadataResponse"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/_export/definition:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
get:
tags:
- APIs
summary: Export an API
description: |-
⚠️ Support only v4 API for the moment. ⚠️
Export an API to a JSON file.
User must have at least the API_DEFINITION[READ] permission.<br>
User should also have these permissions for specific data:
- API_DEFINITION[READ] for the API
- API_MEMBER[READ] for the API's members
- API_PLAN[READ] for the API's plans
- API_METADATA[READ] for the API's metadata
- API_DOCUMENTATION[READ] for the API's documentation pages
operationId: exportApiDefinition
responses:
"200":
description: API deployment successfully deployed
headers:
Content-Disposition:
schema:
type: string
example: attachment; filename="api-definition.json"
content:
application/json:
schema:
$ref: "#/components/schemas/ExportApiV4"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/_start:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
post:
tags:
- APIs
summary: Start an API
description: |-
Change the API's status to STARTED.
Return a 400 HTTP Error:
- when user tries to start an ARCHIVED API
- when the API is already STARTED
- when the API needs to be reviewed (only if Review feature is activated).
User must have the API_DEFINITION[UPDATE] permission.
operationId: startApi
responses:
"204":
description: API successfully started
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/_stop:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
post:
tags:
- APIs
summary: Stop an API
description: |-
Change the API's status to STOPPED.
Return a 400 HTTP Error:
- when user tries to stop an ARCHIVED API
- when the API is already STOPPED.
User must have the API_DEFINITION[UPDATE] permission.
operationId: stopApi
responses:
"204":
description: API successfully stopped
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/_transfer-ownership:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
post:
tags:
- APIs
summary: Transfer the ownership of the API
description: |-
Transfer the ownership of the API to a user, a group or an api member.
Return a 404 HTTP Error if API cannot be found.
Return a 400 HTTP Error:
- when user tries to stop an ARCHIVED API
- when the API is already STOPPED.
User must have the API_MEMBER[UPDATE] permission.
operationId: transferOwnership
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ApiTransferOwnership"
required: true
responses:
"204":
description: Ownership has been transfered successfully
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/_duplicate:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
post:
tags:
- APIs
summary: Duplicate an API
description: |-
Create a new API from an existing one.
Context-path is required for HTTP APIs and host is required for TCP APIs. If one of these fields is missing, then it returns a 400 Bad Request.
User must have at least the API_DEFINITION[READ] and ENVIRONMENT_API[CREATE] permissions.
operationId: duplicateApi
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DuplicateApiOptions"
required: true
responses:
"200":
description: API successfully duplicated
content:
application/json:
schema:
$ref: "#/components/schemas/Api"
default:
$ref: "#/components/responses/Error"
# API Reviews
/environments/{envId}/apis/{apiId}/reviews/_ask:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
post:
tags:
- APIs
summary: Ask for a review
description: |-
Ask for a review
Return a 400 HTTP Error:
- when user tries to change reviews state of an ARCHIVED API
- when user tries to change reviews state of an API already in review
User must have the API_DEFINITION[UPDATE] permission.
operationId: reviewsAsk
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ApiReview"
required: true
responses:
"204":
description: API successfully change review state
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/reviews/_accept:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
post:
tags:
- APIs
summary: Accept a review
description: |-
Accept a review
Return a 400 HTTP Error:
- when user tries to change reviews state of an ARCHIVED API
- when user tries to change reviews state of an API that is not in review
User must have the API_REVIEWS[UPDATE] permission.
operationId: reviewsAccept
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ApiReview"
required: true
responses:
"204":
description: API successfully change review state
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/reviews/_reject:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
post:
tags:
- APIs
summary: Reject a review
description: |-
Reject a review
Return a 400 HTTP Error:
- when user tries to change reviews state of an ARCHIVED API
- when user tries to change reviews state of an API that is not in review
User must have the API_REVIEWS[UPDATE] permission.
operationId: reviewsReject
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ApiReview"
required: true
responses:
"204":
description: API successfully change review state
default:
$ref: "#/components/responses/Error"
# API Members
/environments/{envId}/apis/{apiId}/members:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
get:
parameters:
- $ref: "#/components/parameters/pageParam"
- $ref: "#/components/parameters/perPageParam"
tags:
- API Members
summary: Get the API's members
description: |
List the members for a given API.
User must have the API_MEMBER[READ] permission.
operationId: listApiMembers
responses:
"200":
$ref: "#/components/responses/MembersResponse"
default:
$ref: "#/components/responses/Error"
post:
tags:
- API Members
summary: Add a member to an API.
description: |
Add a new member to an API.
Returns a 400 HTTP Error:
- when the user tries to set a member as PrimaryOwner.
User must have the API_MEMBER[CREATE] permission.
operationId: addApiMember
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/AddApiMember"
required: true
responses:
"201":
description: Member successfully added
content:
application/json:
schema:
$ref: "#/components/schemas/Member"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/members/{memberId}:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
- $ref: "#/components/parameters/memberIdParam"
put:
tags:
- API Members
summary: Updates a member for an API.
description: |
Edit a member for an API.
Returns a 400 HTTP Error:
- when the user tries to set a member as PrimaryOwner.
User must have the API_MEMBER[UPDATE] permission.
operationId: updateApiMember
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateApiMember"
required: true
responses:
"200":
description: Membership successfully edited.
content:
application/json:
schema:
$ref: "#/components/schemas/Member"
default:
$ref: "#/components/responses/Error"
delete:
tags:
- API Members
summary: Remove one API member
description: |
Remove an API member.
Returns a 400 HTTP Error:
- when the user tries to remove a PrimaryOwner.
User must have the API_MEMBER[DELETE] permission.
operationId: removeApiMember
responses:
"204":
description: API member successfully removed
default:
$ref: "#/components/responses/Error"
# API Plans
/environments/{envId}/apis/{apiId}/plans:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
get:
parameters:
- name: statuses
in: query
required: false
description: List of status filters
schema:
type: array
items:
$ref: "#/components/schemas/PlanStatus"
default: ["published"]
explode: false
- name: securities
in: query
required: false
description: List of security plan type filters
schema:
type: array
items:
$ref: "#/components/schemas/PlanSecurityType"
explode: false
- name: mode
in: query
required: false
description: Mode of plan
schema:
$ref: "#/components/schemas/PlanMode"
- $ref: "#/components/parameters/pageParam"
- $ref: "#/components/parameters/perPageParam"
tags:
- API Plans
summary: List the API's plans
description: |
List plans for a given API, always filtered by a `status` and the possibility to filter by `security`.<br>
The results are paginated.
User must have API_PLAN[READ] permissions to access endpoint.
operationId: listApiPlans
responses:
"200":
$ref: "#/components/responses/PlansResponse"
default:
$ref: "#/components/responses/Error"
post:
tags:
- API Plans
summary: Create an API's plan
description: |-
Create a new plan on a given API.
User must have the API_PLAN[CREATE] permission.
operationId: createApiPlan
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreatePlan"
required: true
responses:
"201":
description: Plan successfully created
content:
application/json:
schema:
$ref: "#/components/schemas/Plan"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/plans/{planId}:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
- $ref: "#/components/parameters/planIdParam"
get:
tags:
- API Plans
summary: Get one API's plan
description: |-
Get the API's plan by its identifier.
User must have the API_PLAN[READ] permission.
operationId: getApiPlan
responses:
"200":
description: An API's plan
content:
application/json:
schema:
$ref: "#/components/schemas/Plan"
default:
$ref: "#/components/responses/Error"
put:
tags:
- API Plans
summary: Update one API's plan
description: |-
Update the API's plan.
User must have the API_PLAN[UPDATE] permission.
operationId: updateApiPlan
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UpdatePlan"
required: true
responses:
"200":
description: API's plan successfully updated
content:
application/json:
schema:
$ref: "#/components/schemas/Plan"
default:
$ref: "#/components/responses/Error"
delete:
tags:
- API Plans
summary: Delete one API's plan
description: |-
Delete the API's plan.
User must have the API_PLAN[DELETE] permission.
operationId: deleteApiPlan
responses:
"204":
description: API's plan successfully deleted
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/plans/{planId}/_close:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
- $ref: "#/components/parameters/planIdParam"
post:
tags:
- API Plans
summary: Close an API's plan
description: |-
Close the API's plan.
User must have the API_PLAN[UPDATE] permission.
operationId: closeApiPlan
responses:
"200":
description: API's plan successfully closed
content:
application/json:
schema:
$ref: "#/components/schemas/Plan"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/plans/{planId}/_deprecate:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
- $ref: "#/components/parameters/planIdParam"
post:
tags:
- API Plans
summary: Deprecate an API's plan
description: |-
Deprecate the API's plan.
User must have the API_PLAN[UPDATE] permission.
operationId: deprecateApiPlan
responses:
"200":
description: API's plan successfully deprecated
content:
application/json:
schema:
$ref: "#/components/schemas/Plan"
default:
$ref: "#/components/responses/Error"
/environments/{envId}/apis/{apiId}/plans/{planId}/_publish:
parameters:
- $ref: "#/components/parameters/envIdParam"
- $ref: "#/components/parameters/apiIdParam"
- $ref: "#/components/parameters/planIdParam"
post:
tags:
- API Plans
summary: Publish an API's plan
description: |-
Publish the API's plan.
User must have the API_PLAN[UPDATE] permission.
operationId: publishApiPlan
responses:
"200":
description: API's plan successfully published
content:
application/json:
schema:
$ref: "#/components/schemas/Plan"
default:
$ref: "#/components/responses/Error"
# Group
/environments/{envId}/groups:
parameters:
- $ref: "#/components/parameters/envIdParam"
get:
parameters:
- $ref: "#/components/parameters/pageParam"
- $ref: "#/components/parameters/perPageParam"