Create a Service Binding
POST /v2/service_bindings
Request
Route
POST /v2/service_bindings
Body
Name |
Description |
Default |
Valid Values |
Example Values |
service_instance_guid
|
The guid of the service instance to bind
|
|
|
|
app_guid
|
The guid of the app to bind
|
|
|
|
binding_options
|
A hash of options that are passed to v1 brokers
|
|
|
|
parameters
|
Arbitrary parameters to pass along to the service broker. Must be a JSON object
|
|
|
|
{
"service_instance_guid": "98bdea00-d2ad-4843-9c23-3618df23c50e",
"app_guid": "2453ebff-16d2-4d18-947c-8b15ccc4b866",
"parameters": {
"the_service_broker": "wants this object"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "98bdea00-d2ad-4843-9c23-3618df23c50e",
"app_guid": "2453ebff-16d2-4d18-947c-8b15ccc4b866",
"parameters": {
"the_service_broker": "wants this object"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzMCIsImVtYWlsIjoiZW1haWwtMTYyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMTB9.fO2RdBY9q3tGf_yCIY2e8PIcrpWog58VL4mXoTi03fE" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "ba6eb627-0973-4d7e-a83c-54fba55dfc59",
"url": "/v2/service_bindings/ba6eb627-0973-4d7e-a83c-54fba55dfc59",
"created_at": "2015-10-13T17:31:50Z",
"updated_at": null
},
"entity": {
"app_guid": "2453ebff-16d2-4d18-947c-8b15ccc4b866",
"service_instance_guid": "98bdea00-d2ad-4843-9c23-3618df23c50e",
"credentials": {
"creds-key-351": "creds-val-351"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/2453ebff-16d2-4d18-947c-8b15ccc4b866",
"service_instance_url": "/v2/user_provided_service_instances/98bdea00-d2ad-4843-9c23-3618df23c50e"
}
}
Headers