Creating a User Provided Service Instance
POST /v2/user_provided_service_instances/
Request
Route
POST /v2/user_provided_service_instances
Body
Name |
Description |
Default |
Valid Values |
Example Values |
name
|
A name for the service instance
|
|
|
- my-user-provided-instance
|
space_guid
|
The guid of the space in which the instance will be created
|
|
|
|
syslog_drain_url
|
URL to which logs will be streamed for bound applications.
|
|
|
|
credentials
|
A hash exposed in the VCAP_SERVICES environment variable for bound applications.
|
|
|
|
route_service_url
|
URL to which requests for bound routes will be forwarded.
|
|
|
- https://logger.example.com
|
{
"space_guid": "da17668e-ad2b-4561-87d8-53d860e5f3a2",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com",
"route_service_url": "https://logger.example.com"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/user_provided_service_instances" -d '{
"space_guid": "da17668e-ad2b-4561-87d8-53d860e5f3a2",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com",
"route_service_url": "https://logger.example.com"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1OSIsImVtYWlsIjoiZW1haWwtOTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MTQxMzY4M30.UK62ZhFJCfUzuOWgQcPi-0bqQjtn0sSqNPdkW2SACEU" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "d2d48ba7-063f-45c1-965f-3d5db2598fc0",
"url": "/v2/user_provided_service_instances/d2d48ba7-063f-45c1-965f-3d5db2598fc0",
"created_at": "2015-12-22T18:28:03Z",
"updated_at": null
},
"entity": {
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"space_guid": "da17668e-ad2b-4561-87d8-53d860e5f3a2",
"type": "user_provided_service_instance",
"syslog_drain_url": "syslog://example.com",
"route_service_url": "https://logger.example.com",
"space_url": "/v2/spaces/da17668e-ad2b-4561-87d8-53d860e5f3a2",
"service_bindings_url": "/v2/user_provided_service_instances/d2d48ba7-063f-45c1-965f-3d5db2598fc0/service_bindings",
"routes_url": "/v2/user_provided_service_instances/d2d48ba7-063f-45c1-965f-3d5db2598fc0/routes"
}
}
Headers