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": "d0acc514-f4a6-40aa-9954-72b7e07b8d9c",
"app_guid": "e81a14e4-ad09-486e-9df2-559de029c701",
"parameters": {
"the_service_broker": "wants this object"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "d0acc514-f4a6-40aa-9954-72b7e07b8d9c",
"app_guid": "e81a14e4-ad09-486e-9df2-559de029c701",
"parameters": {
"the_service_broker": "wants this object"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NSIsImVtYWlsIjoiZW1haWwtMjc1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTd9.-FWiEEHzpttwUxhiQ_k4QdJn5-EcLsV9_XK67EjBSR4" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "ec136e32-4ef7-4b7d-80ae-8cb8104e1784",
"url": "/v2/service_bindings/ec136e32-4ef7-4b7d-80ae-8cb8104e1784",
"created_at": "2015-08-31T21:50:17Z",
"updated_at": null
},
"entity": {
"app_guid": "e81a14e4-ad09-486e-9df2-559de029c701",
"service_instance_guid": "d0acc514-f4a6-40aa-9954-72b7e07b8d9c",
"credentials": {
"creds-key-614": "creds-val-614"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/e81a14e4-ad09-486e-9df2-559de029c701",
"service_instance_url": "/v2/user_provided_service_instances/d0acc514-f4a6-40aa-9954-72b7e07b8d9c"
}
}
Headers