Create a Service Binding
POST /v2/service_bindings
Fields
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
|
|
|
|
Request
Headers
Route
POST /v2/service_bindings
Body
{
"service_instance_guid": "be598629-d9c1-40fa-a039-677b21a8da02",
"app_guid": "533465e0-d236-45d9-9da7-5e3919fcaf53"
}
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "be598629-d9c1-40fa-a039-677b21a8da02",
"app_guid": "533465e0-d236-45d9-9da7-5e3919fcaf53"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1MiIsImVtYWlsIjoiZW1haWwtMTkzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4Nzh9.OVe8ZZbSQLqMdIt2TjE9OlXZf0sFCkh6XJIgf-Whq1w" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "4c4221ea-2bf2-4113-b548-25ff2ab5cf16",
"url": "/v2/service_bindings/4c4221ea-2bf2-4113-b548-25ff2ab5cf16",
"created_at": "2015-01-27T19:14:38Z",
"updated_at": null
},
"entity": {
"app_guid": "533465e0-d236-45d9-9da7-5e3919fcaf53",
"service_instance_guid": "be598629-d9c1-40fa-a039-677b21a8da02",
"credentials": {
"creds-key-422": "creds-val-422"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/533465e0-d236-45d9-9da7-5e3919fcaf53",
"service_instance_url": "/v2/user_provided_service_instances/be598629-d9c1-40fa-a039-677b21a8da02"
}
}