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": "00c16fba-f9e1-487b-96fe-29c7b08a398f",
"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": "00c16fba-f9e1-487b-96fe-29c7b08a398f",
"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.eyJ1c2VyX2lkIjoidWFhLWlkLTMyNiIsImVtYWlsIjoiZW1haWwtMjI4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2NDB9.KgUXgnN3FY0xpd_z_BfoSx_JeoVoSHC_99a2-7AtJt8" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "a510ccc3-d775-4b05-901b-f4f19efcc632",
"url": "/v2/user_provided_service_instances/a510ccc3-d775-4b05-901b-f4f19efcc632",
"created_at": "2016-04-16T01:24:00Z",
"updated_at": null
},
"entity": {
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"space_guid": "00c16fba-f9e1-487b-96fe-29c7b08a398f",
"type": "user_provided_service_instance",
"syslog_drain_url": "syslog://example.com",
"route_service_url": "https://logger.example.com",
"space_url": "/v2/spaces/00c16fba-f9e1-487b-96fe-29c7b08a398f",
"service_bindings_url": "/v2/user_provided_service_instances/a510ccc3-d775-4b05-901b-f4f19efcc632/service_bindings",
"routes_url": "/v2/user_provided_service_instances/a510ccc3-d775-4b05-901b-f4f19efcc632/routes"
}
}
Headers