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": "df9bfb6a-0044-4751-bba0-4a9431c49490",
"app_guid": "9a1d4b7d-46b6-47f2-a894-dc721c7aa154"
}
cURL
curl "https://api.[your-domain.com]/v2/service_bindings" -d '{
"service_instance_guid": "df9bfb6a-0044-4751-bba0-4a9431c49490",
"app_guid": "9a1d4b7d-46b6-47f2-a894-dc721c7aa154"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1NiIsImVtYWlsIjoiZW1haWwtMjU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzl9.YGCV8XS7rA85WZL0dpq0Eyqg9lkgNQ1-rkgeQnA8gFQ" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "c769286c-80a7-465f-b757-5c2c44476b87",
"url": "/v2/service_bindings/c769286c-80a7-465f-b757-5c2c44476b87",
"created_at": "2015-02-10T01:42:59Z",
"updated_at": null
},
"entity": {
"app_guid": "9a1d4b7d-46b6-47f2-a894-dc721c7aa154",
"service_instance_guid": "df9bfb6a-0044-4751-bba0-4a9431c49490",
"credentials": {
"creds-key-572": "creds-val-572"
},
"binding_options": {
},
"gateway_data": null,
"gateway_name": "",
"syslog_drain_url": null,
"app_url": "/v2/apps/9a1d4b7d-46b6-47f2-a894-dc721c7aa154",
"service_instance_url": "/v2/user_provided_service_instances/df9bfb6a-0044-4751-bba0-4a9431c49490"
}
}