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": "4cb803d9-46bd-411b-878a-8e9ea137f1c5",
"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": "4cb803d9-46bd-411b-878a-8e9ea137f1c5",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxIiwiZW1haWwiOiJlbWFpbC0yMUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyNzc0OTc5fQ.0OpraaC6QTdrnbPMrxbmoqhy8TK8FtQTd2UZYO6QLsU" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "52fd52ce-f9fa-42d7-b236-0e807c8faffe",
"url": "/v2/user_provided_service_instances/52fd52ce-f9fa-42d7-b236-0e807c8faffe",
"created_at": "2015-05-21T01:02:59Z",
"updated_at": null
},
"entity": {
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"space_guid": "4cb803d9-46bd-411b-878a-8e9ea137f1c5",
"type": "user_provided_service_instance",
"syslog_drain_url": "syslog://example.com",
"space_url": "/v2/spaces/4cb803d9-46bd-411b-878a-8e9ea137f1c5",
"service_bindings_url": "/v2/user_provided_service_instances/52fd52ce-f9fa-42d7-b236-0e807c8faffe/service_bindings"
}
}
Headers