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": "19414b63-3f7f-4789-8e31-925faf155414",
"app_guid": "23ddd767-bc1c-426c-8112-5562ae8516a2",
"parameters": {
"the_service_broker": "wants this object"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "19414b63-3f7f-4789-8e31-925faf155414",
"app_guid": "23ddd767-bc1c-426c-8112-5562ae8516a2",
"parameters": {
"the_service_broker": "wants this object"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1IiwiZW1haWwiOiJlbWFpbC00M0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODMwfQ.lvoAla9F-tGWb5iA0_mmK-rnQqdZLsd7aWKQYiD9MTY" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "5e1b7d69-7e94-413c-b98e-084f4bb36e0a",
"url": "/v2/service_bindings/5e1b7d69-7e94-413c-b98e-084f4bb36e0a",
"created_at": "2015-11-03T00:53:50Z",
"updated_at": null
},
"entity": {
"app_guid": "23ddd767-bc1c-426c-8112-5562ae8516a2",
"service_instance_guid": "19414b63-3f7f-4789-8e31-925faf155414",
"credentials": {
"creds-key-114": "creds-val-114"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/23ddd767-bc1c-426c-8112-5562ae8516a2",
"service_instance_url": "/v2/user_provided_service_instances/19414b63-3f7f-4789-8e31-925faf155414"
}
}
Headers