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": "5ccdeea3-686f-4eef-a5c2-b626147785b9",
"app_guid": "991e9266-717b-49bc-ad25-95b2f9c3e5fa"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "5ccdeea3-686f-4eef-a5c2-b626147785b9",
"app_guid": "991e9266-717b-49bc-ad25-95b2f9c3e5fa"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OSIsImVtYWlsIjoiZW1haWwtMjkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NjZ9.yo1nClWWfGkFREYZ5Ue3wtNHiMvO3RFyCEIqgvAFPPk" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "8f7caeaf-9bcd-4bee-bf29-22d0c87a212a",
"url": "/v2/service_bindings/8f7caeaf-9bcd-4bee-bf29-22d0c87a212a",
"created_at": "2015-03-05T19:16:06Z",
"updated_at": null
},
"entity": {
"app_guid": "991e9266-717b-49bc-ad25-95b2f9c3e5fa",
"service_instance_guid": "5ccdeea3-686f-4eef-a5c2-b626147785b9",
"credentials": {
"creds-key-635": "creds-val-635"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/991e9266-717b-49bc-ad25-95b2f9c3e5fa",
"service_instance_url": "/v2/user_provided_service_instances/5ccdeea3-686f-4eef-a5c2-b626147785b9"
}
}
Headers