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": "ea53a6d2-b2a4-48a4-a83f-8112a095f780",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/user_provided_service_instances" -d '{
"space_guid": "ea53a6d2-b2a4-48a4-a83f-8112a095f780",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NCIsImVtYWlsIjoiZW1haWwtMjY2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5Njh9.-6WuMPgRF5Eq5v9qbEsKFVcC6BNOnzyPGdX7eq4eIH0" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "89d2ecb0-0c1c-4a00-94ab-e11ddeccdbb4",
"url": "/v2/user_provided_service_instances/89d2ecb0-0c1c-4a00-94ab-e11ddeccdbb4",
"created_at": "2015-10-15T23:52:48Z",
"updated_at": null
},
"entity": {
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"space_guid": "ea53a6d2-b2a4-48a4-a83f-8112a095f780",
"type": "user_provided_service_instance",
"syslog_drain_url": "syslog://example.com",
"route_service_url": "",
"space_url": "/v2/spaces/ea53a6d2-b2a4-48a4-a83f-8112a095f780",
"service_bindings_url": "/v2/user_provided_service_instances/89d2ecb0-0c1c-4a00-94ab-e11ddeccdbb4/service_bindings",
"routes_url": "/v2/user_provided_service_instances/89d2ecb0-0c1c-4a00-94ab-e11ddeccdbb4/routes"
}
}
Headers