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
|
|
|
|
Request
Headers
Route
POST /v2/service_instances
Body
{
"space_guid": "b74a8e2b-edf1-4547-9cc1-7b57aea010c0",
"name": "my-service-instance",
"service_plan_guid": "562db757-6217-4037-8690-71d5eee30bec"
}
cURL
curl "https://api.[your-domain.com]/v2/service_instances" -d '{
"space_guid": "b74a8e2b-edf1-4547-9cc1-7b57aea010c0",
"name": "my-service-instance",
"service_plan_guid": "562db757-6217-4037-8690-71d5eee30bec"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzMiIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzV9.LjIhw5BaMtP7qGowJpL5qzbs5bzurtpjPoGf2ziowiY" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "961b2a6c-9012-4fe4-9dff-134db8ffcc65",
"url": "/v2/service_instances/961b2a6c-9012-4fe4-9dff-134db8ffcc65",
"created_at": "2014-12-24T01:39:35+00:00",
"updated_at": null
},
"entity": {
"name": "my-service-instance",
"credentials": {
"creds-key-410": "creds-val-410"
},
"service_plan_guid": "562db757-6217-4037-8690-71d5eee30bec",
"space_guid": "b74a8e2b-edf1-4547-9cc1-7b57aea010c0",
"gateway_data": "CONFIGURATION",
"dashboard_url": "http://dashboard.example.com",
"type": "managed_service_instance",
"space_url": "/v2/spaces/b74a8e2b-edf1-4547-9cc1-7b57aea010c0",
"service_plan_url": "/v2/service_plans/562db757-6217-4037-8690-71d5eee30bec",
"service_bindings_url": "/v2/service_instances/961b2a6c-9012-4fe4-9dff-134db8ffcc65/service_bindings"
}
}