-
Notifications
You must be signed in to change notification settings - Fork 434
/
openapi.yaml
1053 lines (1011 loc) · 28.3 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
# This is the Open API interface for Open Service Broker API. Every attempt will
# be made to make the Open API version of OSB API accurately represent the
# written specification. If the spec and this document conflict, the spec is
# the authority.
openapi: "3.0.0"
tags:
- name: Open Service Broker API Specification
info:
title: Open Service Broker API
description: The Open Service Broker API defines an HTTP(S) interface between Platforms and Service Brokers.
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
contact:
name: Open Service Broker API
url: https://www.openservicebrokerapi.org/
email: open-service-broker-api@googlegroups.com
version: master - might contain changes that are not yet released
servers:
- url: http://example.com
description: Broker Endpoint
- url: http://localhost:3000
description: OSB Checker - MockOSB
paths:
/v2/catalog:
get:
summary: get the catalog of services that the service broker offers
tags:
- Catalog
operationId: catalog.get
parameters:
- $ref: '#/components/parameters/APIVersion'
responses:
'200':
description: catalog response
content:
application/json:
schema:
$ref: '#/components/schemas/Catalog'
/v2/service_instances/{instance_id}:
put:
summary: provision a service instance
tags:
- ServiceInstances
operationId: serviceInstance.provision
parameters:
- $ref: '#/components/parameters/APIVersion'
- $ref: '#/components/parameters/OriginatingIdentity'
- name: instance_id
in: path
description: instance id of instance to provision
required: true
schema:
type: string
- name: accepts_incomplete
in: query
description: asynchronous operations supported
schema:
type: boolean
requestBody:
description: parameters for the requested service instance provision
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceInstanceProvisionRequestBody'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceInstanceProvisionResponse'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceInstanceProvisionResponse'
'202':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceInstanceAsyncOperation'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
patch:
summary: update a service instance
tags:
- ServiceInstances
operationId: serviceInstance.update
parameters:
- $ref: '#/components/parameters/APIVersion'
- $ref: '#/components/parameters/OriginatingIdentity'
- name: instance_id
in: path
description: instance id of instance to update
required: true
schema:
type: string
- name: accepts_incomplete
in: query
description: asynchronous operations supported
schema:
type: boolean
requestBody:
description: parameters for the requested service instance update
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceInstanceUpdateRequestBody'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Object'
'202':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceInstanceAsyncOperation'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Unprocessable entity
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: deprovision a service instance
tags:
- ServiceInstances
operationId: serviceInstance.deprovision
parameters:
- $ref: '#/components/parameters/APIVersion'
- $ref: '#/components/parameters/OriginatingIdentity'
- name: instance_id
in: path
description: id of instance being deleted
required: true
schema:
type: string
- name: service_id
in: query
description: id of the service associated with the instance being deleted
required: true
schema:
type: string
- name: plan_id
in: query
description: id of the plan associated with the instance being deleted
required: true
schema:
type: string
- name: accepts_incomplete
in: query
description: asynchronous deprovision supported
schema:
type: boolean
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Object'
'202':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncOperation'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'410':
description: Gone
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
summary: get a service instance
tags:
- ServiceInstances
operationId: serviceInstance.get
parameters:
- $ref: '#/components/parameters/APIVersion'
- $ref: '#/components/parameters/OriginatingIdentity'
- name: instance_id
in: path
description: instance id of instance to fetch
required: true
schema:
type: string
- name: service_id
in: query
description: id of the service associated with the instance
schema:
type: string
- name: plan_id
in: query
description: id of the plan associated with the instance
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceInstanceResource'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/service_instances/{instance_id}/last_operation:
get:
summary: get the last requested operation state for service instance
tags:
- ServiceInstances
operationId: serviceInstance.lastOperation.get
parameters:
- $ref: '#/components/parameters/APIVersion'
- name: instance_id
in: path
description: instance id of instance to find last operation applied to it
required: true
schema:
type: string
- name: service_id
in: query
description: id of the service associated with the instance
schema:
type: string
- name: plan_id
in: query
description: id of the plan associated with the instance
schema:
type: string
- name: operation
in: query
description: a provided identifier for the operation
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LastOperationResource'
headers:
Retry-After:
description: Indicates when to retry the request
required: false
schema:
type: string
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'410':
description: Gone
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation:
get:
summary: get the last requested operation state for service binding
tags:
- ServiceBindings
operationId: serviceBinding.lastOperation.get
parameters:
- $ref: '#/components/parameters/APIVersion'
- name: instance_id
in: path
description: instance id of instance to find last operation applied to it
required: true
schema:
type: string
- name: binding_id
in: path
description: binding id of service binding to find last operation applied to it
required: true
schema:
type: string
- name: service_id
in: query
description: id of the service associated with the instance
schema:
type: string
- name: plan_id
in: query
description: id of the plan associated with the instance
schema:
type: string
- name: operation
in: query
description: a provided identifier for the operation
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LastOperationResource'
headers:
Retry-After:
description: Indicates when to retry the request
required: false
schema:
type: string
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'410':
description: Gone
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/service_instances/{instance_id}/service_bindings/{binding_id}:
put:
summary: generate a service binding
tags:
- ServiceBindings
operationId: serviceBinding.binding
parameters:
- $ref: '#/components/parameters/APIVersion'
- $ref: '#/components/parameters/OriginatingIdentity'
- name: instance_id
in: path
description: instance id of instance to create a binding on
required: true
schema:
type: string
- name: binding_id
in: path
description: binding id of binding to create
required: true
schema:
type: string
- name: accepts_incomplete
in: query
description: asynchronous operations supported
schema:
type: boolean
requestBody:
description: parameters for the requested service binding
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceBindingRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceBindingResponse'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceBindingResponse'
'202':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncOperation'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
summary: deprovision a service binding
tags:
- ServiceBindings
operationId: serviceBinding.unbinding
parameters:
- $ref: '#/components/parameters/APIVersion'
- $ref: '#/components/parameters/OriginatingIdentity'
- name: instance_id
in: path
description: id of the instance associated with the binding being deleted
required: true
schema:
type: string
- name: binding_id
in: path
description: id of the binding being deleted
required: true
schema:
type: string
- name: service_id
in: query
description: id of the service associated with the instance for which a binding is being deleted
required: true
schema:
type: string
- name: plan_id
in: query
description: id of the plan associated with the instance for which a binding is being deleted
required: true
schema:
type: string
- name: accepts_incomplete
in: query
description: asynchronous operations supported
schema:
type: boolean
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Object'
'202':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncOperation'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'410':
description: Gone
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
summary: get a service binding
tags:
- ServiceBindings
operationId: serviceBinding.get
parameters:
- $ref: '#/components/parameters/APIVersion'
- $ref: '#/components/parameters/OriginatingIdentity'
- name: instance_id
in: path
description: instance id of instance associated with the binding
required: true
schema:
type: string
- name: binding_id
in: path
description: binding id of binding to fetch
required: true
schema:
type: string
- name: service_id
in: query
description: id of the service associated with the instance
schema:
type: string
- name: plan_id
in: query
description: id of the plan associated with the instance
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceBindingResource'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
parameters:
APIVersion:
name: X-Broker-API-Version
in: header
description: version number of the Service Broker API that the Platform will use
required: true
schema:
type: string
default: '2.13'
OriginatingIdentity:
name: X-Broker-API-Originating-Identity
in: header
description: identity of the user that initiated the request from the Platform
schema:
type: string
schemas:
Catalog:
type: object
properties:
services:
type: array
items:
$ref: '#/components/schemas/Service'
Service:
type: object
required:
- name
- id
- description
- bindable
- plans
properties:
name:
type: string
id:
type: string
description:
type: string
tags:
type: array
items:
type: string
requires:
type: array
items:
type: string
enum:
- syslog_drain
- route_forwarding
- volume_mount
bindable:
type: boolean
metadata:
$ref: '#/components/schemas/Metadata'
dashboard_client:
$ref: '#/components/schemas/DashboardClient'
binding_rotatable:
type: boolean
plan_updateable:
type: boolean
plans:
type: array
items:
$ref: '#/components/schemas/Plan'
DashboardClient:
type: object
properties:
id:
type: string
secret:
type: string
redirect_uri:
type: string
Plan:
type: object
required:
- id
- name
- description
properties:
id:
type: string
name:
type: string
description:
type: string
metadata:
$ref: '#/components/schemas/Metadata'
maintenance_info:
$ref: '#/components/schemas/MaintenanceInfo'
free:
type: boolean
default: true
bindable:
type: boolean
schemas:
$ref: '#/components/schemas/Schemas'
maximum_polling_duration:
type: integer
plan_updateable:
type: boolean
binding_rotatable:
type: boolean
default: false
Schemas:
type: object
properties:
service_instance:
$ref: '#/components/schemas/ServiceInstanceSchema'
service_binding:
$ref: '#/components/schemas/ServiceBindingSchema'
ServiceInstanceSchema:
type: object
properties:
create:
type: object
properties:
parameters:
type: object
update:
type: object
properties:
parameters:
type: object
ServiceBindingSchema:
type: object
properties:
create:
type: object
properties:
parameters:
type: object
ServiceInstanceResource:
type: object
properties:
service_id:
type: string
plan_id:
type: string
dashboard_url:
type: string
parameters:
$ref: '#/components/schemas/Object'
maintenance_info:
$ref: '#/components/schemas/MaintenanceInfo'
metadata:
$ref: '#/components/schemas/ServiceInstanceMetadata'
ServiceInstanceProvisionRequestBody:
type: object
required:
- service_id
- plan_id
- organization_guid
- space_guid
properties:
service_id:
type: string
plan_id:
type: string
context:
$ref: '#/components/schemas/Context'
organization_guid:
type: string
deprecated: true
space_guid:
type: string
deprecated: true
parameters:
$ref: '#/components/schemas/Object'
ServiceInstanceProvisionResponse:
type: object
properties:
dashboard_url:
type: string
metadata:
$ref: '#/components/schemas/ServiceInstanceMetadata'
ServiceInstanceAsyncOperation:
type: object
properties:
dashboard_url:
type: string
operation:
type: string # could be a link object to last operation
metadata:
$ref: '#/components/schemas/ServiceInstanceMetadata'
ServiceInstanceMetadata:
type: object
properties:
labels:
type: object
attributes:
type: object
ServiceInstanceUpdateRequestBody:
type: object
required:
- service_id
properties:
context:
$ref: '#/components/schemas/Context'
service_id:
type: string
plan_id:
type: string
parameters:
$ref: '#/components/schemas/Object'
previous_values:
$ref: '#/components/schemas/ServiceInstancePreviousValues'
ServiceInstancePreviousValues:
type: object
properties:
service_id:
type: string
deprecated: true
plan_id:
type: string
organization_id:
type: string
deprecated: true
space_id:
type: string
deprecated: true
AsyncOperation:
type: object
properties:
operation:
type: string
LastOperationResource:
type: object
required:
- state
properties:
state:
type: string
enum:
- "in progress"
- "succeeded"
- "failed"
description:
type: string
instance_usable:
type: boolean
update_repeatable:
type: boolean
ServiceBindingResource:
type: object
properties:
metadata:
$ref: '#/components/schemas/ServiceBindingMetadata'
credentials:
$ref: '#/components/schemas/Object'
syslog_drain_url:
type: string
route_service_url:
type: string
volume_mounts:
type: array
items:
$ref: '#/components/schemas/ServiceBindingVolumeMount'
endpoints:
type: array
items:
$ref: '#/components/schemas/ServiceBindingEndpoint'
parameters:
$ref: '#/components/schemas/Object'
ServiceBindingRequest:
type: object
required:
- service_id
- plan_id
properties:
context:
$ref: '#/components/schemas/Context'
service_id:
type: string
plan_id:
type: string
app_guid:
type: string
deprecated: true
bind_resource:
$ref: '#/components/schemas/ServiceBindingResouceObject'
parameters:
$ref: '#/components/schemas/Object'
predecessor_binding_id:
type: string
ServiceBindingMetadata:
type: object
properties:
expires_at:
type: string
renew_before:
type: string
ServiceBindingResouceObject:
type: object
properties:
app_guid:
type: string
route:
type: string
ServiceBindingResponse:
type: object
properties:
metadata:
$ref: '#/components/schemas/ServiceBindingMetadata'
credentials:
$ref: '#/components/schemas/Object'
syslog_drain_url:
type: string
route_service_url:
type: string
volume_mounts:
type: array
items:
$ref: '#/components/schemas/ServiceBindingVolumeMount'
endpoints:
type: array
items:
$ref: '#/components/schemas/ServiceBindingEndpoint'
ServiceBindingEndpoint:
type: object
required:
- host
- ports
properties:
host:
type: string
ports:
type: array
items:
type: string
protocol:
type: string
enum:
- 'tcp'
- 'udp'
- 'all'
default: 'tcp'
ServiceBindingVolumeMount:
type: object
required:
- driver
- container_dir
- mode
- device_type
- device
properties:
driver:
type: string
container_dir:
type: string
mode:
type: string
enum:
- r
- rw
device_type:
type: string
enum:
- shared
device:
$ref: '#/components/schemas/ServiceBindingVolumeMountDevice'
ServiceBindingVolumeMountDevice:
type: object