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": "133bcd9a-f950-48c8-b069-01355ae146d9",
"app_guid": "5c68b57b-c8e4-4ad4-823f-f1ea3a3f8248",
"parameters": {
"the_service_broker": "wants this object"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "133bcd9a-f950-48c8-b069-01355ae146d9",
"app_guid": "5c68b57b-c8e4-4ad4-823f-f1ea3a3f8248",
"parameters": {
"the_service_broker": "wants this object"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwMSIsImVtYWlsIjoiZW1haWwtNjhAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MzMxMDk3NH0.06C3jFG8vzGsWiYMT_6eo2dl9yA2okqw2If-lskniNk" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "6888ec9c-6134-4fa3-9bce-6618f3b33c2e",
"url": "/v2/service_bindings/6888ec9c-6134-4fa3-9bce-6618f3b33c2e",
"created_at": "2016-01-13T17:29:34Z",
"updated_at": null
},
"entity": {
"app_guid": "5c68b57b-c8e4-4ad4-823f-f1ea3a3f8248",
"service_instance_guid": "133bcd9a-f950-48c8-b069-01355ae146d9",
"credentials": {
"creds-key-17": "creds-val-17"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/5c68b57b-c8e4-4ad4-823f-f1ea3a3f8248",
"service_instance_url": "/v2/user_provided_service_instances/133bcd9a-f950-48c8-b069-01355ae146d9"
}
}
Headers