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": "d924b87a-e5f2-4d33-b6cb-17fb34464f17",
"app_guid": "1d35c2e4-c716-4256-b925-39fe656f7776",
"parameters": {
"the_service_broker": "wants this object"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "d924b87a-e5f2-4d33-b6cb-17fb34464f17",
"app_guid": "1d35c2e4-c716-4256-b925-39fe656f7776",
"parameters": {
"the_service_broker": "wants this object"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyMSIsImVtYWlsIjoiZW1haWwtMjg5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDV9.ZDFLFL-yCf_iyBD2yYUj8ksmCmwjKyKzMCB_egCECFs" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "454af6b8-dafe-4d39-b2f6-6259f65e11da",
"url": "/v2/service_bindings/454af6b8-dafe-4d39-b2f6-6259f65e11da",
"created_at": "2015-10-07T00:35:45Z",
"updated_at": null
},
"entity": {
"app_guid": "1d35c2e4-c716-4256-b925-39fe656f7776",
"service_instance_guid": "d924b87a-e5f2-4d33-b6cb-17fb34464f17",
"credentials": {
"creds-key-643": "creds-val-643"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/1d35c2e4-c716-4256-b925-39fe656f7776",
"service_instance_url": "/v2/user_provided_service_instances/d924b87a-e5f2-4d33-b6cb-17fb34464f17"
}
}
Headers