forked from openservicebrokerapi/servicebroker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
swagger.yaml
639 lines (636 loc) · 15.9 KB
/
swagger.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
# This is the Open API 2.0 (Swagger) interface for Open Service Broker API.
# Every attempt will be made to make the Open API 2.0 version of OSB API
# accurately represent the written specification. If the spec and this document
# conflict, the spec is the authority.
swagger: '2.0'
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: [email protected]
version: v2.13
paths:
/v2/catalog:
get:
summary: get the catalog of services that the service broker offers
tags:
- Catalog
operationId: catalog.get
parameters:
- $ref: '#/parameters/APIVersion'
produces:
- application/json
responses:
'200':
description: catalog response
schema:
$ref: '#/definitions/Catalog'
'/v2/service_instances/{instance_id}':
parameters:
- $ref: '#/parameters/APIVersion'
- $ref: '#/parameters/OriginatingIdentity'
- $ref: '#/parameters/instance_id'
put:
summary: provision a service instance
tags:
- ServiceInstances
operationId: serviceInstance.provision
consumes:
- application/json
produces:
- application/json
parameters:
- name: body
in: body
description: parameters for the requested service instance provision
required: true
schema:
$ref: '#/definitions/ServiceInstanceProvisionRequest'
- $ref: '#/parameters/accepts_incomplete'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ServiceInstanceProvision'
'201':
description: Created
schema:
$ref: '#/definitions/ServiceInstanceProvision'
'202':
description: Accepted
schema:
$ref: '#/definitions/ServiceInstanceAsyncProvision'
'400':
description: Bad Request
schema:
$ref: '#/definitions/Error'
'409':
description: Conflict
schema:
$ref: '#/definitions/Error'
'422':
description: Unprocessable Entity
schema:
$ref: '#/definitions/Error'
patch:
summary: update a service instance
tags:
- ServiceInstances
operationId: serviceInstance.update
consumes:
- application/json
produces:
- application/json
parameters:
- name: body
in: body
description: parameters for the requested service instance update
required: true
schema:
$ref: '#/definitions/ServiceInstanceUpdateRequest'
- $ref: '#/parameters/accepts_incomplete'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Object'
'202':
description: Accepted
schema:
$ref: '#/definitions/AsyncOperation'
'400':
description: Bad Request
schema:
$ref: '#/definitions/Error'
'422':
description: Unprocessable entity
schema:
$ref: '#/definitions/Error'
delete:
summary: deprovision a service instance
tags:
- ServiceInstances
operationId: serviceInstance.deprovision
produces:
- application/json
parameters:
- $ref: '#/parameters/accepts_incomplete'
- $ref: '#/parameters/service_id'
- $ref: '#/parameters/plan_id'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Object'
'202':
description: Accepted
schema:
$ref: '#/definitions/AsyncOperation'
'400':
description: Bad Request
schema:
$ref: '#/definitions/Error'
'410':
description: Gone
schema:
$ref: '#/definitions/Error'
'422':
description: Unprocessable Entity
schema:
$ref: '#/definitions/Error'
get:
summary: gets a service instance
tags:
- ServiceInstances
operationId: serviceInstance.get
parameters:
- $ref: '#/parameters/APIVersion'
- $ref: '#/parameters/OriginatingIdentity'
- $ref: '#/parameters/instance_id'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ServiceInstanceResource'
'404':
description: Not Found
schema:
$ref: '#/definitions/Error'
'/v2/service_instances/{instance_id}/last_operation':
parameters:
- $ref: '#/parameters/APIVersion'
- $ref: '#/parameters/instance_id'
get:
summary: last requested operation state for service instance
tags:
- ServiceInstances
operationId: serviceInstance.lastOperation.get
produces:
- application/json
parameters:
- name: service_id
in: query
description: id of the service associated with the instance
type: string
- name: plan_id
in: query
description: id of the plan associated with the instance
type: string
- name: operation
in: query
description: a provided identifier for the operation
type: string
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ServiceInstanceLastOperation'
'400':
description: Bad Request
schema:
$ref: '#/definitions/Error'
'410':
description: Gone
schema:
$ref: '#/definitions/Error'
'/v2/service_instances/{instance_id}/service_bindings/{binding_id}':
parameters:
- $ref: '#/parameters/APIVersion'
- $ref: '#/parameters/OriginatingIdentity'
- $ref: '#/parameters/instance_id'
- $ref: '#/parameters/binding_id'
put:
summary: generation of a service binding
tags:
- ServiceBindings
operationId: serviceBinding.binding
produces:
- application/json
parameters:
- name: body
in: body
description: parameters for the requested service binding
required: true
schema:
$ref: '#/definitions/ServiceBindingRequest'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ServiceBinding'
'201':
description: Created
schema:
$ref: '#/definitions/ServiceBinding'
'400':
description: Bad Request
schema:
$ref: '#/definitions/Error'
'409':
description: Conflict
schema:
$ref: '#/definitions/Error'
'422':
description: Unprocessable Entity
schema:
$ref: '#/definitions/Error'
delete:
summary: deprovision of a service binding
tags:
- ServiceBindings
operationId: serviceBinding.unbinding
parameters:
- $ref: '#/parameters/service_id'
- $ref: '#/parameters/plan_id'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Object'
'400':
description: Bad Request
schema:
$ref: '#/definitions/Error'
'410':
description: Gone
schema:
$ref: '#/definitions/Error'
get:
summary: gets a service binding
tags:
- ServiceBindings
operationId: serviceBinding.get
parameters:
- $ref: '#/parameters/APIVersion'
- $ref: '#/parameters/OriginatingIdentity'
- $ref: '#/parameters/instance_id'
- $ref: '#/parameters/binding_id'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ServiceBindingResource'
'404':
description: Not Found
schema:
$ref: '#/definitions/Error'
parameters:
APIVersion:
name: X-Broker-API-Version
in: header
description: version number of the Service Broker API that the Platform will use
required: true
type: string
OriginatingIdentity:
name: X-Broker-API-Originating-Identity
in: header
description: identity of the user that initiated the request from the Platform
type: string
instance_id:
name: instance_id
in: path
description: instance id of instance to provision
required: true
type: string
accepts_incomplete:
name: accepts_incomplete
in: query
description: asynchronous operations supported
type: boolean
service_id:
name: service_id
in: query
description: id of the service associated with the instance being deleted
required: true
type: string
plan_id:
name: plan_id
in: query
description: id of the plan associated with the instance being deleted
required: true
type: string
binding_id:
name: binding_id
in: path
description: binding id of binding to create
required: true
type: string
definitions:
Catalog:
type: object
properties:
services:
type: array
items:
$ref: '#/definitions/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: '#/definitions/Metadata'
dashboard_client:
$ref: '#/definitions/DashboardClient'
plan_updateable:
type: boolean
plans:
type: array
items:
$ref: '#/definitions/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: '#/definitions/Metadata'
free:
type: boolean
default: true
bindable:
type: boolean
schemas:
$ref: '#/definitions/SchemasObject'
SchemasObject:
type: object
properties:
service_instance:
$ref: '#/definitions/ServiceInstanceSchemaObject'
service_binding:
$ref: '#/definitions/ServiceBindingSchemaObject'
ServiceInstanceSchemaObject:
type: object
properties:
create:
$ref: '#/definitions/SchemaParameters'
update:
$ref: '#/definitions/SchemaParameters'
ServiceBindingSchemaObject:
type: object
properties:
create:
$ref: '#/definitions/SchemaParameters'
SchemaParameters:
type: object
properties:
parameters:
$ref: '#/definitions/JSONSchemaObject'
JSONSchemaObject:
type: object
ServiceInstanceResource:
type: object
properties:
service_id:
type: string
plan_id:
type: string
dashboard_url:
type: string
parameters:
$ref: '#/definitions/Object'
ServiceInstanceProvisionRequest:
type: object
required:
- service_id
- plan_id
- organization_guid
- space_guid
properties:
service_id:
type: string
plan_id:
type: string
context:
$ref: '#/definitions/Context'
organization_guid:
type: string
x-deprecated: true
space_guid:
type: string
x-deprecated: true
parameters:
$ref: '#/definitions/Object'
ServiceInstanceProvision:
type: object
properties:
dashboard_url:
type: string
ServiceInstanceAsyncProvision:
type: object
properties:
dashboard_url:
type: string
operation:
type: string
ServiceInstanceUpdateRequest:
type: object
required:
- service_id
properties:
context:
$ref: '#/definitions/Context'
service_id:
type: string
plan_id:
type: string
parameters:
$ref: '#/definitions/Object'
previous_values:
$ref: '#/definitions/ServiceInstancePreviousValues'
ServiceInstancePreviousValues:
type: object
properties:
service_id:
type: string
x-deprecated: true
plan_id:
type: string
organization_id:
type: string
x-deprecated: true
space_id:
type: string
x-deprecated: true
AsyncOperation:
type: object
properties:
operation:
type: string
ServiceInstanceLastOperation:
type: object
required:
- state
properties:
state:
type: string
enum:
- in progress
- succeeded
- failed
description:
type: string
ServiceBindingResource:
type: object
properties:
credentials:
$ref: '#/definitions/Object'
syslog_drain_url:
type: string
route_service_url:
type: string
volume_mounts:
type: array
items:
$ref: '#/definitions/ServiceBindingVolumeMount'
parameters:
$ref: '#/definitions/Object'
ServiceBindingRequest:
type: object
required:
- service_id
- plan_id
properties:
context:
$ref: '#/definitions/Context'
service_id:
type: string
plan_id:
type: string
app_guid:
type: string
x-deprecated: true
bind_resource:
$ref: '#/definitions/ServiceBindingResourceObject'
parameters:
$ref: '#/definitions/Object'
ServiceBindingResourceObject:
type: object
properties:
app_guid:
type: string
route:
type: string
ServiceBinding:
type: object
properties:
credentials:
$ref: '#/definitions/Object'
syslog_drain_url:
type: string
route_service_url:
type: string
volume_mounts:
type: array
items:
$ref: '#/definitions/ServiceBindingVolumeMount'
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: '#/definitions/ServiceBindingVolumeMountDevice'
ServiceBindingVolumeMountDevice:
type: object
required:
- volume_id
properties:
volume_id:
type: string
mount_config:
$ref: '#/definitions/Object'
Context:
description: >-
See [Context
Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#context-object)
for more details.
type: object
Metadata:
description: >-
See [Service Metadata
Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#service-metadata)
for more details.
type: object
Object:
type: object
Error:
type: object
properties:
error:
type: string
description:
type: string
securityDefinitions:
basicAuth:
type: basic
security:
- basicAuth: []
externalDocs:
description: The offical Open Service Broker API specification
url: 'https://github.com/openservicebrokerapi/servicebroker/'