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": "ac27aefa-a456-47b4-8d2f-f7992859ec90",
"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": "ac27aefa-a456-47b4-8d2f-f7992859ec90",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0NyIsImVtYWlsIjoiZW1haWwtMjYzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NjR9.NR2JqQw9uEb6RSc1vtlGdQBM4C1uhwWpIpDI_dbdxCk" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "713be309-d88c-4a00-9214-1badfe82952c",
"url": "/v2/user_provided_service_instances/713be309-d88c-4a00-9214-1badfe82952c",
"created_at": "2015-06-16T23:41:04Z",
"updated_at": null
},
"entity": {
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"space_guid": "ac27aefa-a456-47b4-8d2f-f7992859ec90",
"type": "user_provided_service_instance",
"syslog_drain_url": "syslog://example.com",
"space_url": "/v2/spaces/ac27aefa-a456-47b4-8d2f-f7992859ec90",
"service_bindings_url": "/v2/user_provided_service_instances/713be309-d88c-4a00-9214-1badfe82952c/service_bindings"
}
}
Headers