Create a Service Binding
POST /v2/service_bindings
Fields
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
|
|
|
|
Request
Headers
Route
POST /v2/service_bindings
Body
{
"service_instance_guid": "2957fd57-0916-4391-b267-0422c6868958",
"app_guid": "4946428d-5204-401b-99ba-8b8c774a1357"
}
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "2957fd57-0916-4391-b267-0422c6868958",
"app_guid": "4946428d-5204-401b-99ba-8b8c774a1357"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2IiwiZW1haWwiOiJlbWFpbC0xNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE5OTg5OTYxfQ.nVALasQ2Ha-VB4GFAAaN0Smm8zoGseOfKSyqOdgh8Ew" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "4df66f86-8f20-4298-8559-f1e7fd7ecd46",
"url": "/v2/service_bindings/4df66f86-8f20-4298-8559-f1e7fd7ecd46",
"created_at": "2014-12-24T01:39:21+00:00",
"updated_at": null
},
"entity": {
"app_guid": "4946428d-5204-401b-99ba-8b8c774a1357",
"service_instance_guid": "2957fd57-0916-4391-b267-0422c6868958",
"credentials": {
"creds-key-37": "creds-val-37"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/4946428d-5204-401b-99ba-8b8c774a1357",
"service_instance_url": "/v2/user_provided_service_instances/2957fd57-0916-4391-b267-0422c6868958"
}
}