Creating a Service Instance
POST /v2/service_instances/
Fields
Name |
Description |
Default |
Valid Values |
Example Values |
name
|
A name for the service instance
|
|
|
|
service_plan_guid
|
The guid of the service plan to associate with the instance
|
|
|
|
space_guid
|
The guid of the space in which the instance will be created
|
|
|
|
gateway_data
|
Configuration information for the broker gateway in v1 services
|
|
|
|
Parameters
Name |
Description |
Valid Values |
Example Values |
accepts_incomplete
|
Set to `true` if the client allows asynchronous provisioning. The cloud controller may respond before the service is ready for use.
|
|
|
Request
Headers
Route
POST /v2/service_instances
Body
{
"space_guid": "b240834c-4e0b-4882-b270-3201e85d1404",
"name": "my-service-instance",
"service_plan_guid": "0cf2cfe1-b8fd-4379-aeda-d4208e355439"
}
cURL
curl "https://api.[your-domain.com]/v2/service_instances" -d '{
"space_guid": "b240834c-4e0b-4882-b270-3201e85d1404",
"name": "my-service-instance",
"service_plan_guid": "0cf2cfe1-b8fd-4379-aeda-d4208e355439"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk2IiwiZW1haWwiOiJlbWFpbC02N0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MzEwMTIzfQ.69LWxaEGt13rc9UxFHcwLi-8hNTbwA4F_bQ2Vvbf2dU" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "c39f20ee-3e63-4938-80a9-68df9a52f0d3",
"url": "/v2/service_instances/c39f20ee-3e63-4938-80a9-68df9a52f0d3",
"created_at": "2015-02-12T01:42:03Z",
"updated_at": null
},
"entity": {
"name": "my-service-instance",
"credentials": {
"creds-key-142": "creds-val-142"
},
"service_plan_guid": "0cf2cfe1-b8fd-4379-aeda-d4208e355439",
"space_guid": "b240834c-4e0b-4882-b270-3201e85d1404",
"gateway_data": "CONFIGURATION",
"dashboard_url": "http://dashboard.example.com",
"type": "managed_service_instance",
"last_operation": {
"type": "create",
"state": "succeeded",
"description": "",
"updated_at": "2015-02-12T01:42:03Z"
},
"space_url": "/v2/spaces/b240834c-4e0b-4882-b270-3201e85d1404",
"service_plan_url": "/v2/service_plans/0cf2cfe1-b8fd-4379-aeda-d4208e355439",
"service_bindings_url": "/v2/service_instances/c39f20ee-3e63-4938-80a9-68df9a52f0d3/service_bindings"
}
}