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": "a0029c76-7017-4a74-94b0-54a04ad94b80",
"app_guid": "081d55a0-1bfa-4e51-8d08-273f764988db",
"parameters": {
"the_service_broker": "wants this object"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "a0029c76-7017-4a74-94b0-54a04ad94b80",
"app_guid": "081d55a0-1bfa-4e51-8d08-273f764988db",
"parameters": {
"the_service_broker": "wants this object"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyOSIsImVtYWlsIjoiZW1haWwtMjkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDN9.0nz1Ucxdt02DdJU5Hy01gCKXpkSXViUBT9mEveDB7WE" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "4e690cd4-66ef-4052-a23d-0d748316f18c",
"url": "/v2/service_bindings/4e690cd4-66ef-4052-a23d-0d748316f18c",
"created_at": "2016-06-08T16:41:42Z",
"updated_at": "2016-06-08T16:41:26Z"
},
"entity": {
"app_guid": "081d55a0-1bfa-4e51-8d08-273f764988db",
"service_instance_guid": "a0029c76-7017-4a74-94b0-54a04ad94b80",
"credentials": {
"creds-key-63": "creds-val-63"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"volume_mounts": [
],
"app_url": "/v2/apps/081d55a0-1bfa-4e51-8d08-273f764988db",
"service_instance_url": "/v2/user_provided_service_instances/a0029c76-7017-4a74-94b0-54a04ad94b80"
}
}
Headers