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": "a6719e7f-320d-469c-8f8e-c2a7958f83da",
"name": "my-service-instance",
"service_plan_guid": "b0f5f738-c405-4cba-8c28-3ceac838362e"
}
cURL
curl "https://api.[your-domain.com]/v2/service_instances" -d '{
"space_guid": "a6719e7f-320d-469c-8f8e-c2a7958f83da",
"name": "my-service-instance",
"service_plan_guid": "b0f5f738-c405-4cba-8c28-3ceac838362e"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNSIsImVtYWlsIjoiZW1haWwtNzZAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyMjk5MDg3MH0.9-XaVZFgZNrw95RJatb95FZZ-VqiQ_TIYDydWj_hZF8" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "64abd95e-0790-4847-9eb4-25016706b501",
"url": "/v2/service_instances/64abd95e-0790-4847-9eb4-25016706b501",
"created_at": "2015-01-27T19:14:30Z",
"updated_at": null
},
"entity": {
"name": "my-service-instance",
"credentials": {
"creds-key-170": "creds-val-170"
},
"service_plan_guid": "b0f5f738-c405-4cba-8c28-3ceac838362e",
"space_guid": "a6719e7f-320d-469c-8f8e-c2a7958f83da",
"gateway_data": "CONFIGURATION",
"dashboard_url": "http://dashboard.example.com",
"type": "managed_service_instance",
"state": null,
"state_description": null,
"space_url": "/v2/spaces/a6719e7f-320d-469c-8f8e-c2a7958f83da",
"service_plan_url": "/v2/service_plans/b0f5f738-c405-4cba-8c28-3ceac838362e",
"service_bindings_url": "/v2/service_instances/64abd95e-0790-4847-9eb4-25016706b501/service_bindings"
}
}