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": "d5774c57-2a0b-4b9a-8c9e-4b58de3db10c",
"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": "d5774c57-2a0b-4b9a-8c9e-4b58de3db10c",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5IiwiZW1haWwiOiJlbWFpbC0xOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI3NDgwODQxfQ.0EQYlm22w7PKNQb3yeUHEBVYBgvPUS67l6KUeU8Fuao" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "f4ffec14-50fa-4516-850c-c5f39315a3f8",
"url": "/v2/user_provided_service_instances/f4ffec14-50fa-4516-850c-c5f39315a3f8",
"created_at": "2015-03-20T18:27:21Z",
"updated_at": null
},
"entity": {
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"space_guid": "d5774c57-2a0b-4b9a-8c9e-4b58de3db10c",
"type": "user_provided_service_instance",
"syslog_drain_url": "syslog://example.com",
"space_url": "/v2/spaces/d5774c57-2a0b-4b9a-8c9e-4b58de3db10c",
"service_bindings_url": "/v2/user_provided_service_instances/f4ffec14-50fa-4516-850c-c5f39315a3f8/service_bindings"
}
}
Headers