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
|
|
|
|
{
"service_instance_guid": "8c45495f-ffda-47c7-854e-fb052a36d4fb",
"app_guid": "0c789562-d983-47be-b94d-70c0a2adca0a"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "8c45495f-ffda-47c7-854e-fb052a36d4fb",
"app_guid": "0c789562-d983-47be-b94d-70c0a2adca0a"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0OCIsImVtYWlsIjoiZW1haWwtMjUwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MjB9.Ov9fyHtbKk0u8KsLe3zuKuGqA80HxTlHbMycOUqNDIs" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "d8d0c887-a80f-4607-ac50-1b7d030e26df",
"url": "/v2/service_bindings/d8d0c887-a80f-4607-ac50-1b7d030e26df",
"created_at": "2015-03-10T23:12:00Z",
"updated_at": null
},
"entity": {
"app_guid": "0c789562-d983-47be-b94d-70c0a2adca0a",
"service_instance_guid": "8c45495f-ffda-47c7-854e-fb052a36d4fb",
"credentials": {
"creds-key-539": "creds-val-539"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/0c789562-d983-47be-b94d-70c0a2adca0a",
"service_instance_url": "/v2/user_provided_service_instances/8c45495f-ffda-47c7-854e-fb052a36d4fb"
}
}
Headers