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": "f646ee9b-37ec-4725-ab64-d566f7c3116a",
"app_guid": "f50c9078-c026-463f-9eeb-5342e4691deb"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "f646ee9b-37ec-4725-ab64-d566f7c3116a",
"app_guid": "f50c9078-c026-463f-9eeb-5342e4691deb"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MCIsImVtYWlsIjoiZW1haWwtMTIzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NTF9.dBf0u3TjYj_GUuh3Tseh8npro-xayznPg6WwgPvNQSc" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "c9d83a66-b238-4a3c-ab38-6b4e3baca841",
"url": "/v2/service_bindings/c9d83a66-b238-4a3c-ab38-6b4e3baca841",
"created_at": "2015-03-20T18:27:31Z",
"updated_at": null
},
"entity": {
"app_guid": "f50c9078-c026-463f-9eeb-5342e4691deb",
"service_instance_guid": "f646ee9b-37ec-4725-ab64-d566f7c3116a",
"credentials": {
"creds-key-284": "creds-val-284"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/f50c9078-c026-463f-9eeb-5342e4691deb",
"service_instance_url": "/v2/user_provided_service_instances/f646ee9b-37ec-4725-ab64-d566f7c3116a"
}
}
Headers