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": "c7cbe0e1-f8b0-411f-bf44-a4df5d445ad1",
"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": "c7cbe0e1-f8b0-411f-bf44-a4df5d445ad1",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTcyIiwiZW1haWwiOiJlbWFpbC00MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQyNjAxNTI4fQ.zcyDXCeYUNT--4zP_DZC56nUmz3yUI42UzE8AJRsLj8" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "cd1d9683-4045-4aa8-b9de-662d018af9d4",
"url": "/v2/user_provided_service_instances/cd1d9683-4045-4aa8-b9de-662d018af9d4",
"created_at": "2015-09-11T18:38:47Z",
"updated_at": null
},
"entity": {
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"space_guid": "c7cbe0e1-f8b0-411f-bf44-a4df5d445ad1",
"type": "user_provided_service_instance",
"syslog_drain_url": "syslog://example.com",
"space_url": "/v2/spaces/c7cbe0e1-f8b0-411f-bf44-a4df5d445ad1",
"service_bindings_url": "/v2/user_provided_service_instances/cd1d9683-4045-4aa8-b9de-662d018af9d4/service_bindings"
}
}
Headers