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": "8c163f0a-321f-4914-be7a-c426e60dc18d",
"app_guid": "28ce9704-379f-4285-9343-ac3d6bdfaf75",
"parameters": {
"the_service_broker": "wants this object"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "8c163f0a-321f-4914-be7a-c426e60dc18d",
"app_guid": "28ce9704-379f-4285-9343-ac3d6bdfaf75",
"parameters": {
"the_service_broker": "wants this object"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyNCIsImVtYWlsIjoiZW1haWwtMzE0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMTh9.fNJDO3UhttKKLUiOZ5KnvvavGnarU-fVRaBHnh9-V_4" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "1b7dc382-ede5-4107-ae2f-1db4948cc2d5",
"url": "/v2/service_bindings/1b7dc382-ede5-4107-ae2f-1db4948cc2d5",
"created_at": "2015-08-06T00:36:58Z",
"updated_at": null
},
"entity": {
"app_guid": "28ce9704-379f-4285-9343-ac3d6bdfaf75",
"service_instance_guid": "8c163f0a-321f-4914-be7a-c426e60dc18d",
"credentials": {
"creds-key-696": "creds-val-696"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/28ce9704-379f-4285-9343-ac3d6bdfaf75",
"service_instance_url": "/v2/user_provided_service_instances/8c163f0a-321f-4914-be7a-c426e60dc18d"
}
}
Headers