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": "813f289e-aaca-445e-91eb-d77a97b82c63",
"app_guid": "3d9378d7-83d3-405f-946f-9dc024811376",
"parameters": {
"the_service_broker": "wants this object"
}
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "813f289e-aaca-445e-91eb-d77a97b82c63",
"app_guid": "3d9378d7-83d3-405f-946f-9dc024811376",
"parameters": {
"the_service_broker": "wants this object"
}
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3OSIsImVtYWlsIjoiZW1haWwtMjc5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNTJ9.Jbi7fcRIa7TNjwc-yNQ0LOSYPKQ1g6myG3Uezhe_qr8" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "10bb5b7e-4823-43c7-8974-beec62f2fa11",
"url": "/v2/service_bindings/10bb5b7e-4823-43c7-8974-beec62f2fa11",
"created_at": "2015-04-15T00:55:51Z",
"updated_at": null
},
"entity": {
"app_guid": "3d9378d7-83d3-405f-946f-9dc024811376",
"service_instance_guid": "813f289e-aaca-445e-91eb-d77a97b82c63",
"credentials": {
"creds-key-618": "creds-val-618"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/3d9378d7-83d3-405f-946f-9dc024811376",
"service_instance_url": "/v2/user_provided_service_instances/813f289e-aaca-445e-91eb-d77a97b82c63"
}
}
Headers