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
|
The url for the syslog_drain to direct to
|
|
|
|
credentials
|
A hash that can be used to store credentials
|
|
|
|
{
"space_guid": "905b5e00-d53b-45da-a22a-33f7a702c4a4",
"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": "905b5e00-d53b-45da-a22a-33f7a702c4a4",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxMiIsImVtYWlsIjoiZW1haWwtMzAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTl9.nx4c_TuggsolxAKQ35ShkOrCmbTEfS5Kj_zkAZGveNg" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "ebe7949e-e85b-49bd-8361-158c61e628fb",
"url": "/v2/user_provided_service_instances/ebe7949e-e85b-49bd-8361-158c61e628fb",
"created_at": "2015-08-31T21:50:19Z",
"updated_at": null
},
"entity": {
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"space_guid": "905b5e00-d53b-45da-a22a-33f7a702c4a4",
"type": "user_provided_service_instance",
"syslog_drain_url": "syslog://example.com",
"space_url": "/v2/spaces/905b5e00-d53b-45da-a22a-33f7a702c4a4",
"service_bindings_url": "/v2/user_provided_service_instances/ebe7949e-e85b-49bd-8361-158c61e628fb/service_bindings"
}
}
Headers