forked from RLOpenCatalyst/service-workbench-on-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
3590 lines (3583 loc) · 95.8 KB
/
openapi.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.0
info:
title: service-workbench-on-aws
description: API collection of service-workbench-on-aws
contact:
email: [email protected]
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: v1.4.3
tags:
- name: admins
description: Secured Admin-only calls
- name: researchers
description: Operations available to regular researchers
- name: internal-guests
description: Operations available to guest users
- name: guests
description: Operations available to guest users
- name: public
description: Operations available to public
- name: BYOB
description: Operations for bring your own bucket configuration
- name: SC-EnvType
description: Operations for service catalog environment types
- name: SC-EnvTypeConfig
description: Operations for service catalog environment type configurations
- name: SC-EnvWorkspace
description: Operations for create and manage workspaces with service catalog environment types
- name: Studies
description: Operations for create and manage studies (Data folders)
- name: Budgets
description: Operations for create and manage budgets
- name: Accounts
description: Operations available for managing internal accounts
- name: AwsAccounts
description: Operations available for managing AWS accounts which back internal accounts
- name: Compute
description: Operations for compute platforms available for provisioning
- name: Index
description: Operations for managing Indexes
- name: IP
description: Operation for getting IP address
- name: Project
description: Operations for managing Projects
- name: CfnTemplate
description: Operation to fetch CloudFormation templates
- name: UserRoles
description: Operation to fetch all types of user roles
- name: User
description: Operations to manage users in Service Workbench
- name: Cost
description: Operation to view cost breakdown
- name: StepTemplates
description: Operations for viewing step templates. Step templates can be added to new Workflows
- name: authN
description: Operation for login, logout, authN provider
- name: Workflows
description: Operations for viewing, editing, and adding Workflows
- name: WorkflowTemplates
description: Operations for viewing, editing, and adding Workflow Templates
- name: KeyPairs
description: Operations for viewing, editing, and adding KeyPairs
paths:
/api/authentication/provider/configs:
get:
tags:
- admin
- authN
summary: Get authentication provider configs detail
operationId: GetAuthNConfigsDetail
description: |
Get authentication provider configs detail
responses:
'200':
description: Array of authN provider configs detail
/api/authentication/provider/types:
get:
tags:
- admin
- authN
summary: Get authentication provider types
operationId: GetAuthNTypes
description: |
Get authentication provider types
responses:
'200':
description: Array of authN provider types
/api/authentication/public/provider/configs/:
get:
tags:
- public
- authN
summary: Get authentication provider configs
operationId: GetAuthNConfigs
description: |
Get authentication provider configs
responses:
'200':
description: Array of authN provider configs
/api/authentication/logout:
post:
tags:
- authN
summary: Log out
operationId: LogOut
description: |
Log out
responses:
'200':
description: Revoked message
/api/costs:
get:
tags:
- researchers
- admins
summary: Get cost breakdown
operationId: GetCosts
description: |
Get cost breakdown based on query parameters
parameters:
- in: query
name: env
schema:
type: string
description: 'EnvironmentId for fetching costs'
- in: query
name: scEnv
schema:
type: string
description: 'Service Catalog EnvironmentId for fetching costs'
- in: query
name: proj
schema:
type: string
description: 'Index to use for fetching costs'
- in: query
name: groupByUser
schema:
type: boolean
description: 'true if grouping costs by user'
- in: query
name: groupByEnv
schema:
type: boolean
description: 'true if grouping costs by environment'
- in: query
name: groupByService
schema:
type: boolean
description: 'true if grouping costs by service'
- in: query
name: numberOfDaysInPast
schema:
type: string
description: 'How far back to look for fetching costs'
responses:
'200':
description: Cost breakdown
/api/users:
get:
tags:
- admins
- researchers
- guests
- internal-guests
- User
summary: List all users
operationId: ListUsers
description: |
List all users
responses:
'200':
description: Array of registered users
post:
tags:
- admins
- User
summary: Create a new User
operationId: CreateUser
description: |
Create a new User
requestBody:
description: User information
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserRequest'
responses:
'200':
description: User added
/api/users/bulk:
post:
tags:
- admins
- User
summary: Create users in bulk
operationId: CreateUsers
description: |
Create a new User
requestBody:
description: Bulk User information
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUsersRequest'
responses:
'200':
description: Users added
/api/users/{userId}:
parameters:
- name: userId
in: path
required: true
schema:
$ref: '#/components/schemas/UserId'
put:
tags:
- admins
- User
summary: Update user
operationId: UpdateUser
requestBody:
description: User information
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUserRequest'
description: |
Update a user
responses:
'200':
description: User updated
/api/user:
get:
tags:
- admins
- researchers
- guests
- internal guests
- User
summary: Get user information of current user
operationId: getCurrentUser
description: |
Get current user information
responses:
'200':
description: user information
put:
tags:
- admins
- researchers
- guests
- internal guests
- User
summary: Update user information of current user
operationId: updateCurrentUser
description: |
Update current user information
responses:
'200':
description: updated user information
requestBody:
description: fields to update in user information
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCurrentUserInfo'
/api/user-roles:
get:
tags:
- admins
- guests
- internal-guests
- researchers
- UserRoles
summary: Fetch all user roles present in Service Workbench
operationId: ListUserRoles
description: |
Fetch all user roles present in Service Workbench
responses:
'200':
description: Array of all the registered user roles
/api/template/{templateId}:
get:
tags:
- admins
- guests
- internal-guests
- researchers
- CfnTemplate
summary: Fetch S3 pre-signed URL which points to the requested CloudFormation template
operationId: GetCfnTemplateById
parameters:
- name: templateId
in: path
required: true
schema:
$ref: '#/components/schemas/TemplateId'
description: |
Fetch S3 pre-signed URL which points to the requested CloudFormation template
responses:
'200':
description: Pre-signed URL pointing to requested CloudFormation template
/api/ip:
get:
tags:
- admins
- guests
- internal-guests
- researchers
- IP
summary: Fetch IP address of the requester
operationId: GetIPAddress
description: |
Fetch IP address of the requester
responses:
'200':
description: IP address of the requester
/api/projects:
get:
tags:
- admins
- Project
summary: List all projects
operationId: ListProjects
description: |
List all projects
responses:
'200':
description: Array of registered projects
post:
tags:
- admins
- Project
summary: Create a new Project
operationId: CreateProject
description: |
Create new Project
requestBody:
description: Project information
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectRequest'
responses:
'200':
description: Project added
/api/projects/{projectId}:
parameters:
- name: projectId
in: path
required: true
schema:
$ref: '#/components/schemas/ProjectId'
get:
tags:
- admins
- Project
summary: Get Project by projectId
operationId: GetProjectById
description: |
List Project by projectId
responses:
'200':
description: The requested project
put:
tags:
- admins
- Project
summary: Update a Project
operationId: UpdateProject
requestBody:
description: Project information
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateProjectRequest'
description: |
Update a Project
responses:
'200':
description: Project updated
/api/indexes:
get:
tags:
- admins
- Index
summary: List all indexes
operationId: ListIndex
description: |
List all indexes
responses:
'200':
description: Array of registered indexes
post:
tags:
- admins
- Index
summary: Create a new Index
operationId: CreateIndex
description: |
Create new Index
requestBody:
description: Index information
content:
application/json:
schema:
$ref: '#/components/schemas/CreateIndexRequest'
responses:
'200':
description: Index added
/api/indexes/{indexId}:
parameters:
- name: indexId
in: path
required: true
schema:
$ref: '#/components/schemas/IndexId'
get:
tags:
- admins
- Index
summary: Get Index by indexId
operationId: GetIndexById
description: |
List Index by indexId
responses:
'200':
description: Array of registered indexes
put:
tags:
- admins
- Index
summary: Update an Index
operationId: UpdateIndex
requestBody:
description: Index information
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateIndexRequest'
description: |
Update an Index
responses:
'200':
description: Index updated
delete:
tags:
- admins
- Index
summary: Delete an Index
operationId: DeleteIndex
description: |
Delete an Index
responses:
'200':
description: Index deleted
/api/aws-accounts:
get:
tags:
- admins
- AwsAccounts
summary: List all registered AWS accounts
operationId: ListAwsAccounts
description: |
List all registered AWS accounts
responses:
'200':
description: Array of registered AWS accounts
post:
tags:
- admins
- AwsAccounts
summary: Create a new AWS Account
operationId: CreateAwsAccount
description: |
Create the AWS Account. Note that this doesn't provision a new account, just adds an entry in backend
requestBody:
description: AWS Account information
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAwsAccountRequest'
responses:
'200':
description: AWS Account information added
/api/aws-accounts/{awsAccountUUID}:
get:
tags:
- admins
- AwsAccounts
summary: Get AWS account information
operationId: GetAwsAccount
parameters:
- name: awsAccountUUID
in: path
required: true
schema:
$ref: '#/components/schemas/AwsAccountUUID'
description: |
Get AWS Account information
responses:
'200':
description: AWS Account information
put:
tags:
- admins
- AwsAccounts
summary: Update an existing AWS Account
operationId: UpdateAwsAccount
description: |
Update an existing AWS Account's details in the backend DB
requestBody:
description: Updated AWS Account information
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAwsAccount'
responses:
'200':
description: AWS Account updated
/api/aws-accounts/provision:
post:
tags:
- admins
- AwsAccounts
summary: Provision a new AWS Account
operationId: ProvisionAwsAccounts
description: |
Provision a new AWS Account
requestBody:
description: AWS Account information
content:
application/json:
schema:
$ref: '#/components/schemas/ProvisionAccountRequest'
responses:
'200':
description: AWS Account provisioning started
/api/aws-accounts/permissions:
get:
tags:
- admins
- AwsAccounts
summary: Get status of permissions for all AWS accounts from CFN stacks
operationId: getAllAwsAccountsPermissionsStatus
description: |
Get status of permissions for all AWS accounts from CFN stacks
responses:
'200':
description: Permissions status information
/api/aws-accounts/{awsAccountUUID}/permissions:
parameters:
- name: awsAccountUUID
in: path
required: true
schema:
$ref: '#/components/schemas/GetAwsAccountPermissionsStatus'
get:
tags:
- admins
- AwsAccounts
summary: Get status of permissions for a specific AWS account using CFN stack
operationId: getAwsAccountPermissionsStatus
description: |
Get status of permissions for a specific AWS account using CFN stack
responses:
'200':
description: Permissions status information
/api/aws-accounts/{awsAccountUUID}/get-template:
parameters:
- name: awsAccountUUID
in: path
required: true
schema:
$ref: '#/components/schemas/GetAwsAccountPermissionsStatus'
get:
tags:
- admins
- AwsAccounts
summary: Upload template to S3 and return information necessary to access the template
operationId: getAndUploadTemplateForAccount
description: |
Uploads expected CFN tempalte for AWS accounts to S3, and returns an object containing a
signed URL to access the template (valid for 12 hours by default). Also returns info
about the stack to be saved in the backend DB for the AWS account.
responses:
'200':
description: CFN Stack info with S3 signed URL.
/api/accounts:
get:
tags:
- admins
- Accounts
summary: List all registered accounts
operationId: ListAccounts
description: |
List all registered accounts
responses:
'200':
description: Array of registered accounts
post:
tags:
- admins
- Accounts
summary: Provision a new AWS Account
operationId: ProvisionAccount
description: |
Provision the requested AWS Account
requestBody:
description: AWS account info for provisioning
content:
application/json:
schema:
$ref: '#/components/schemas/ProvisionAccountRequest'
responses:
'200':
description: AWS Account provisioning started
/api/accounts/{awsAccountId}:
parameters:
- name: awsAccountId
in: path
required: true
schema:
$ref: '#/components/schemas/AwsAccountId'
get:
tags:
- admins
- Accounts
summary: Get account information
operationId: GetAccount
description: |
Get account information
responses:
'200':
description: Account information
put:
tags:
- admins
- Accounts
summary: Update account information
operationId: UpdateAccount
description: |
Update the requested Account
requestBody:
description: Account information to update
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAccountRequest'
responses:
'200':
description: Account information updated
delete:
tags:
- admins
- Accounts
summary: Delete account
operationId: DeleteAccount
description: |
Delete account
responses:
'200':
description: Account deleted
/api/data-sources/accounts:
get:
tags:
- admins
- BYOB
summary: List DS Acccounts
operationId: ListDSAcccounts
description: |
List all external DataSource accounts
responses:
'200':
description: Array of data source accounts
post:
tags:
- admins
- BYOB
summary: Register DS account
description: Add a data source account
operationId: RegisterDSaccount
requestBody:
description: Data source AWS account to add
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDataSourceAccount'
responses:
"201":
description: item created
/api/data-sources/accounts/{awsAccountId}:
put:
tags:
- admins
- BYOB
summary: Update DS account
operationId: UpdateDSaccount
parameters:
- name: awsAccountId
in: path
required: true
schema:
$ref: '#/components/schemas/AwsAccountId'
responses:
'200':
description: 'Update existing data source account'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateDataSourceAccount'
/api/data-sources/accounts/{awsAccountId}/buckets:
post:
tags:
- admins
- BYOB
summary: Register DS bucket
operationId: RegisterDSbucket
parameters:
- name: awsAccountId
in: path
required: true
schema:
$ref: '#/components/schemas/AwsAccountId'
responses:
'201':
description: 'bucket registered'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterDataSourceBucket'
/api/data-sources/accounts/ops/reachability:
post:
tags:
- admins
- BYOB
summary: Attempt to reach
description: Attempt to test reachability/availability of registered accounts and their studies.
operationId: AttemptReach
responses:
'200':
description: reachability/availability of registered accounts and their studies requested
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DataSourceReachability'
/api/data-sources/accounts/{awsAccountId}/cfn:
post:
tags:
- admins
- BYOB
summary: Generate Account CFN template
operationId: GenerateAccountCFNtemplate
description: Creates a CloudFormation template which will create an IAM role in Data Source Account which allows Service Workbench to create roles which will have access to S3 Study paths and KMS keys
parameters:
- name: awsAccountId
in: path
required: true
schema:
$ref: '#/components/schemas/AwsAccountId'
responses:
'200':
description: cfn template for data source account onboard
/api/data-sources/accounts/{awsAccountId}/studies:
get:
tags:
- admins
- BYOB
summary: List studies for account
description: List all the studies under a data source account
operationId: ListStudiesForAccount
parameters:
- name: awsAccountId
in: path
required: true
schema:
$ref: '#/components/schemas/AwsAccountId'
responses:
'200':
description: array of studies under the data source account specified
/api/data-sources/accounts/{awsAccountId}/buckets/{bucketName}/studies:
post:
tags:
- admins
- BYOB
summary: Register Study
operationId: RegisterStudy
parameters:
- name: awsAccountId
in: path
required: true
schema:
$ref: '#/components/schemas/AwsAccountId'
- name: bucketName
in: path
required: true
schema:
type: string
responses:
'200':
description: array of studies under the bucket specified
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterStudy'
/api/workspace-type-candidates:
get:
tags:
- SC-EnvType
- admins
summary: list workspace type candidates
operationId: listWSTypeCandidates
parameters:
- in: query
name: status
schema:
type: string
enum:
- '*'
- 'not-imported'
- name: version
in: query
schema:
type: string
enum:
- '*'
- 'latest'
responses:
'200':
description: Object containing the default Service Catalog portfolio ID, and an array of workspace type candidates that fits the query filters (by default this array contains latest not imported workspace type candidates).
/api/workspace-types:
get:
tags:
- SC-EnvType
- admins
summary: list workspace types
operationId: listWSTypes
parameters:
- in: query
name: status
schema:
type: string
enum:
- '*'
- 'not-approved'
- 'approved'
responses:
'200':
description: Array of workspace types in the status queried. Default return approved.
post:
tags:
- SC-EnvType
- admins
summary: create (import) workspace type
operationId: createWSType
responses:
'200':
description: 'Return the workspace type imported.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEnvType'
/api/workspace-types/{envTypeId}:
parameters:
- name: envTypeId
in: path
required: true
schema:
$ref: '#/components/schemas/EnvTypeId'
get:
tags:
- admins
- SC-EnvType
summary: get environment type
operationId: getEnvType
responses:
'200':
description: 'return the environment type requested'
delete:
tags:
- admins
- SC-EnvType
summary: delete (unimport) environment type
operationId: deleteEnvType
responses:
'200':
description: 'Return empty json object'
put:
tags:
- admins
- SC-EnvType
summary: update environment type
operationId: updateEnvType
responses:
'200':
description: 'Return the updated environment type'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateEnvType'
/api/workspace-types/{envTypeId}/approve:
put:
tags:
- admins
- SC-EnvType
summary: approve imported environment type
operationId: approveEnvType
responses:
'200':
description: 'Return the approved workspace type'
parameters:
- name: envTypeId
in: path
required: true
schema:
$ref: '#/components/schemas/EnvTypeId'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
rev:
type: integer
description: revision number of the workspace type
/api/workspace-types/{envTypeId}/revoke:
put:
summary: revoke
operationId: revoke
tags:
- admins
- SC-EnvType
parameters:
- name: envTypeId
in: path
required: true
schema:
$ref: '#/components/schemas/EnvTypeId'
responses:
'200':
description: 'Return the revoked workspace type'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
rev:
type: integer
description: revision number of the workspace type
/api/workspace-types/{envTypeId}/configurations/:
parameters:
- name: envTypeId
in: path
required: true
schema:
$ref: '#/components/schemas/EnvTypeId'
get:
summary: list environment configurations
operationId: listEnvConfigs
tags:
- admins
- SC-EnvTypeConfig
parameters:
- name: include
in: query
schema:
type: string
enum:
- all
responses:
'200':
description: 'Return array of environment type configurations. Default return allowed to use only.'
post:
summary: create environment type configuration
operationId: createEnvTypeConfig
tags:
- admins
- SC-EnvTypeConfig
responses:
'200':
description: 'Return the env type config created'