-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi-spec-merged.yml
1458 lines (1456 loc) · 38.1 KB
/
openapi-spec-merged.yml
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
components:
responses:
BadRequest:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Bad request.
NotFound:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Not found.
Unauthorized:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unauthorized.
schemas:
AuthenticationStatus:
description: Authentication status.
properties:
isLoggedIn:
type: boolean
userIdentifier:
type: string
required:
- userIdentifier
- isLoggedIn
type: object
BatchDashboardStatus:
properties:
numAccessibleWorkspaces:
format: int32
type: integer
numOwnedWorkspaces:
format: int32
type: integer
numProjects:
format: int32
type: integer
numSecrets:
format: int32
type: integer
numTriggers:
format: int32
type: integer
totalTimesTriggerCalled:
format: int32
type: integer
required:
- numProjects
- numWorkspaces
- numSecrets
- numTriggers
- totalTimesTriggered
type: object
BatchTriggerEventDetails:
properties:
projects:
items:
$ref: '#/components/schemas/Project'
type: array
triggerEvents:
items:
$ref: '#/components/schemas/TriggerEvent'
type: array
workspaces:
items:
$ref: '#/components/schemas/Workspace'
type: array
required:
- triggerEvents
- projects
- workspaces
type: object
BatchWorkspaceProject:
description: Contains all workspaces and their projects.
properties:
projects:
items:
$ref: '#/components/schemas/Project'
type: array
workspaceSecrets:
additionalProperties:
items:
format: int64
type: integer
type: array
type: object
workspaces:
items:
$ref: '#/components/schemas/Workspace'
type: array
required:
- workspaces
- projects
type: object
ConsentStatus:
description: Consent status.
properties:
iAcknowledgePotentialDataLossAndAmAwareOfAllRisks:
type: boolean
required:
- iAcknowledgePotentialDataLossAndAmAwareOfAllRisks
type: object
CsarInitializationInput:
description: Inputs and service template name for deploy and validate commands.
properties:
clean:
type: boolean
inputs:
type: object
required:
- clean
type: object
DeploymentInput:
description: Inputs and service template name for deploy and validate commands.
properties:
inputs:
type: object
service_template:
type: string
required:
- service_template
type: object
DeploymentOutput:
description: Free-form mapping of outputs.
type: object
Empty:
description: Nothing.
maxItems: 0
type: object
EntityCreationStatus:
description: The status of an entity creation request.
properties:
finished:
type: boolean
status:
type: string
required:
- finished
- status
type: object
EntityReference:
description: A reference to another entity.
properties:
id:
format: int64
type: integer
required:
- id
type: object
Error:
description: An error.
properties:
msg:
type: string
required:
- msg
type: object
FilePermissions:
description: Simplified POSIX file permissions.
properties:
group:
exclusiveMinimum: false
format: int32
minimum: 0
type: integer
octalFileMode:
pattern: 0[0-7]{3}
type: string
owner:
exclusiveMinimum: false
format: int32
minimum: 0
type: integer
required:
- owner
- group
- octalFileMode
type: object
Info:
description: Information about an opera environment.
properties:
content_root:
type: string
inputs:
type: object
service_template:
type: string
status:
type: string
type: object
Invocation:
description: An invocation of the deployment.
properties:
exception:
description: An internal xOpera error that occurred during the operation.
type: string
id:
type: string
inputs:
description: Inputs provided for invocation.
type: object
instance_state:
additionalProperties:
type: string
description: State of the instances defined in service template.
type: object
operation:
$ref: '#/components/schemas/OperationType'
service_template:
description: The service template used for the invocation.
type: string
state:
$ref: '#/components/schemas/InvocationState'
stderr:
description: xOpera error output for operation.
type: string
stdout:
description: xOpera console output for operation.
type: string
timestamp:
description: An ISO8601 timestamp of the invocation.
type: string
required:
- id
- state
- operation
- timestamp
type: object
InvocationHistory:
description: Invocation history ordered by timestamp ascending.
items:
$ref: '#/components/schemas/Invocation'
type: array
InvocationState:
enum:
- pending
- in_progress
- success
- failed
type: string
OperationSuccess:
description: A general success message.
properties:
message:
type: string
success:
type: boolean
required:
- success
type: object
OperationType:
enum:
- deploy
- undeploy
type: string
PackagingFormat:
enum:
- zip
- tar
type: string
PackagingInput:
description: Packaging parameters.
properties:
format:
$ref: '#/components/schemas/OperationType'
output:
type: string
service_template:
type: string
service_template_folder:
type: string
required:
- format
- service_template_folder
type: object
PackagingResult:
description: A general success message.
properties:
package_path:
type: string
required:
- package_path
type: object
Project:
description: A project.
properties:
csar:
description: Base64-encoded ZIP file of the CSAR. The service template must
be top-level.
format: byte
type: string
writeOnly: true
id:
format: int64
readOnly: true
type: integer
name:
type: string
workspace:
format: int64
readOnly: true
type: integer
required:
- id
- name
- workspace
- csar
type: object
Secret:
description: A secret.
properties:
contents:
description: Base64-encoded contents.
format: byte
type: string
writeOnly: true
id:
format: int64
readOnly: true
type: integer
name:
type: string
path:
type: string
permissions:
$ref: '#/components/schemas/FilePermissions'
sha512sum:
description: The SHA3-512 checksum of the contents encoded as a hexadecimal
string.
readOnly: true
type: string
workspaces:
format: int64
items:
type: integer
readOnly: true
type: array
required:
- id
- name
- path
- permissions
- contents
- workspaces
type: object
TriggerEvent:
description: A registered callback binding for a TOSCA event.
properties:
callbackUuid:
format: uuid
type: string
eventName:
type: string
id:
format: int64
readOnly: true
type: integer
project:
format: int64
type: integer
timesCalled:
readOnly: true
type: integer
required:
- id
- eventName
- project
type: object
UnpackagingInput:
description: Unpackaging parameters.
properties:
csar:
type: string
destination:
type: string
required:
- csar
type: object
UserIdentifier:
description: A unique identifier for a user.
type: string
ValidationResult:
description: A CSAR validation result.
properties:
message:
type: string
success:
type: boolean
required:
- success
type: object
Workspace:
description: A workspace.
properties:
id:
format: int64
readOnly: true
type: integer
isOwner:
readOnly: true
type: boolean
name:
type: string
projects:
format: int64
items:
type: integer
readOnly: true
type: array
secrets:
format: int64
items:
type: integer
readOnly: true
type: array
required:
- id
- name
- secrets
- projects
- isOwner
type: object
WorkspaceUserAuthorizationRequest:
description: A request for user de-authorization.
properties:
user:
$ref: '#/components/schemas/UserIdentifier'
required:
- user
type: object
info:
title: xOpera SaaS API
version: 1.0.9
openapi: 3.0.0
paths:
/auth/consent:
get:
operationId: getConsent
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ConsentStatus'
description: Consent status.
summary: Get consent status
post:
operationId: setConsent
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ConsentStatus'
description: Consent modification request.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ConsentStatus'
description: The new consent status.
summary: Set consent status.
/auth/status:
get:
operationId: authStatus
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationStatus'
description: Authentication status.
summary: Get the authentication status.
/batch/dashboardStatus:
get:
operationId: batchDashboardStatus
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BatchDashboardStatus'
description: General information.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: General information, shown in the dashboard.
/batch/triggerEventDetails:
get:
operationId: batchTriggerEventDetails
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BatchTriggerEventDetails'
description: Trigger events, related information.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Trigger events and related information.
/batch/workspacesProjectsDetails:
get:
operationId: batchWorkspacesProjectsDetails
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BatchWorkspaceProject'
description: A workspace-project batch response.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Fetch all accessible workspaces and projects at once, full details.
/callback/{callbackUuid}:
parameters:
- in: path
name: callbackUuid
required: true
schema:
format: uuid
type: string
post:
operationId: triggerEventCallback
requestBody:
content:
text/plain:
schema:
type: string
required: false
responses:
'200':
description: The created trigger event.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
summary: Do a trigger.
/secret:
get:
operationId: getSecrets
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/Secret'
type: array
description: A list of secrets.
'401':
$ref: '#/components/responses/Unauthorized'
summary: List available secrets.
post:
operationId: createSecret
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
description: Secret creation request.
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
description: The created secret.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
summary: Create a new secret.
/secret/{secretId}:
delete:
operationId: deleteSecret
responses:
'200':
description: Secret deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Delete a secret.
get:
operationId: describeSecret
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
description: A secret.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Describe a secret.
parameters:
- in: path
name: secretId
required: true
schema:
format: int64
type: integer
post:
operationId: updateSecret
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
description: Secret update request.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Secret'
description: The updated secret.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Update a secret.
/trigger-event/:
get:
operationId: getTriggerEvents
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/TriggerEvent'
type: array
description: A list of trigger events.
'401':
$ref: '#/components/responses/Unauthorized'
summary: List available trigger events.
post:
operationId: createTriggerEvent
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TriggerEvent'
description: Trigger event creation request.
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/TriggerEvent'
description: The created trigger event.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
summary: Create a new trigger event.
/trigger-event/{triggerEventId}:
delete:
operationId: deleteTriggerEvent
responses:
'200':
description: Trigger event deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Delete a trigger event.
get:
operationId: describeTriggerEvent
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TriggerEvent'
description: A trigger event.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Describe a trigger event.
parameters:
- in: path
name: triggerEventId
required: true
schema:
format: int64
type: integer
post:
operationId: updateTriggerEvent
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TriggerEvent'
description: Trigger event update request.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TriggerEvent'
description: The updated trigger event.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Update a trigger event.
/workspace:
get:
operationId: getWorkspaces
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/Workspace'
type: array
description: A list of workspaces.
'401':
$ref: '#/components/responses/Unauthorized'
summary: List available workspaces.
post:
operationId: createWorkspace
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
description: Workspace creation request.
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
description: The created Workspace.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
summary: Create a new workspace.
/workspace/{workspaceId}:
delete:
operationId: deleteWorkspace
responses:
'200':
description: Workspace deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Delete a workspace.
get:
operationId: describeWorkspace
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
description: A workspace.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Describe a workspace.
parameters:
- in: path
name: workspaceId
required: true
schema:
format: int64
type: integer
post:
operationId: updateWorkspace
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
description: Workspace update request.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Workspace'
description: The updated workspace.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Update a workspace.
/workspace/{workspaceId}/authorizations:
delete:
operationId: deauthorizeWorkspaceUser
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkspaceUserAuthorizationRequest'
description: Deauthorization request.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Empty'
description: Success.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Deauthorize a user from the workspace.
get:
operationId: getWorkspaceAuthorizations
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/UserIdentifier'
type: array
description: A list of users authorized to this workspace.
'401':
$ref: '#/components/responses/Unauthorized'
summary: List users authorized to this workspace.
parameters:
- in: path
name: workspaceId
required: true
schema:
format: int64
type: integer
post:
operationId: authorizeWorkspaceUser
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkspaceUserAuthorizationRequest'
description: Authorization request.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Empty'
description: Success.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Authorize a new user to the workspace.
/workspace/{workspaceId}/project:
get:
operationId: listWorkspaceProjects
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/Project'
type: array
description: A list of projects.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: List projects in a workspace.
parameters:
- in: path
name: workspaceId
required: true
schema:
format: int64
type: integer
post:
description: 'Secrets applied to the workspace the project is in are only applied
on creation.
To modify secrets, create a new project.
'
operationId: createWorkspaceProject
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
description: Project creation request.
required: true
responses:
'202':
content:
application/json:
schema:
$ref: '#/components/schemas/EntityReference'
description: A reference to the created project.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Create a new project in the workspace (async).
/workspace/{workspaceId}/project/{projectId}:
delete:
operationId: deleteWorkspaceProject
responses:
'200':
description: Project deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Delete the project.
get:
operationId: describeWorkspaceProject
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
description: A project.
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
summary: Describe the project.
parameters:
- in: path
name: workspaceId
required: true
schema:
format: int64
type: integer
- in: path
name: projectId
required: true
schema:
format: int64
type: integer
post:
operationId: updateWorkspaceProject
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
description: Project update request.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
description: The updated project.
'400':
$ref: '#/components/responses/BadRequest'
'401':