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": "8ce42457-b845-447f-9561-6d22cdd4a0c8",
"app_guid": "637fb135-6e65-44da-8905-7f9dd8c63021",
"parameters": {
"the_service_broker": "wants this object"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "8ce42457-b845-447f-9561-6d22cdd4a0c8",
"app_guid": "637fb135-6e65-44da-8905-7f9dd8c63021",
"parameters": {
"the_service_broker": "wants this object"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMiLCJlbWFpbCI6ImVtYWlsLTNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzODY0MTc4Nn0.AE6GyxugbJxKlWg3Xww47qh3QAOnFmakCHgQ8i1oZUI" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "2686c811-3be9-4012-98a1-4652145ac8fe",
"url": "/v2/service_bindings/2686c811-3be9-4012-98a1-4652145ac8fe",
"created_at": "2015-07-27T22:43:06Z",
"updated_at": null
},
"entity": {
"app_guid": "637fb135-6e65-44da-8905-7f9dd8c63021",
"service_instance_guid": "8ce42457-b845-447f-9561-6d22cdd4a0c8",
"credentials": {
"creds-key-13": "creds-val-13"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/637fb135-6e65-44da-8905-7f9dd8c63021",
"service_instance_url": "/v2/user_provided_service_instances/8ce42457-b845-447f-9561-6d22cdd4a0c8"
}
}
Headers