Creating a User Provided Service Instance
POST /v2/user_provided_service_instances/
Fields
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
|
|
|
|
Request
Headers
Route
POST /v2/user_provided_service_instances
Body
{
"space_guid": "17a0f594-d23f-4abb-9709-e3fc64c0a8f2",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com"
}
cURL
curl "https://api.[your-domain.com]/v2/user_provided_service_instances" -d '{
"space_guid": "17a0f594-d23f-4abb-9709-e3fc64c0a8f2",
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"syslog_drain_url": "syslog://example.com"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNyIsImVtYWlsIjoiZW1haWwtODdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyMjMyMzUzN30.7-jHta06b7_E5i9pUxjtDdvsUDNiOyZYz9RGp_tDapU" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "7d4179d6-cb4e-4508-8979-63d9a3c558b1",
"url": "/v2/user_provided_service_instances/7d4179d6-cb4e-4508-8979-63d9a3c558b1",
"created_at": "2015-01-20T01:52:17+00:00",
"updated_at": null
},
"entity": {
"name": "my-user-provided-instance",
"credentials": {
"somekey": "somevalue"
},
"space_guid": "17a0f594-d23f-4abb-9709-e3fc64c0a8f2",
"type": "user_provided_service_instance",
"syslog_drain_url": "syslog://example.com",
"space_url": "/v2/spaces/17a0f594-d23f-4abb-9709-e3fc64c0a8f2",
"service_bindings_url": "/v2/user_provided_service_instances/7d4179d6-cb4e-4508-8979-63d9a3c558b1/service_bindings"
}
}