Home
Version 3
Service Instances API

Service Instances API

Creating a Service Instance

POST /v2/service_instances/

Fields

Name Description Default Valid Values Example Values
name A name for the service instance
  • my-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

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NyIsImVtYWlsIjoiZW1haWwtMjEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MTN9.xpWTL7vV1UfCPWTa3zlA12w4jIo3BDMbq2nkH_-3NW4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/service_instances

Body

{
  "space_guid": "448d53be-d4c8-45db-adb5-7d12e3ab9627",
  "name": "my-service-instance",
  "service_plan_guid": "51c13e3c-72ae-4881-a8ea-f2ddf34d801b"
}

cURL

curl "https://api.[your-domain.com]/v2/service_instances" -d '{
  "space_guid": "448d53be-d4c8-45db-adb5-7d12e3ab9627",
  "name": "my-service-instance",
  "service_plan_guid": "51c13e3c-72ae-4881-a8ea-f2ddf34d801b"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NyIsImVtYWlsIjoiZW1haWwtMjEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MTN9.xpWTL7vV1UfCPWTa3zlA12w4jIo3BDMbq2nkH_-3NW4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_instances/07f0b519-9b6a-4e51-a305-58801e56d564
X-VCAP-Request-ID: 76f14d45-a763-4abc-b028-603b7c08ee34
Content-Length: 848
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "07f0b519-9b6a-4e51-a305-58801e56d564",
    "url": "/v2/service_instances/07f0b519-9b6a-4e51-a305-58801e56d564",
    "created_at": "2014-11-13T23:38:33+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "my-service-instance",
    "credentials": {
      "creds-key-459": "creds-val-459"
    },
    "service_plan_guid": "51c13e3c-72ae-4881-a8ea-f2ddf34d801b",
    "space_guid": "448d53be-d4c8-45db-adb5-7d12e3ab9627",
    "gateway_data": "CONFIGURATION",
    "dashboard_url": "http://dashboard.example.com",
    "type": "managed_service_instance",
    "space_url": "/v2/spaces/448d53be-d4c8-45db-adb5-7d12e3ab9627",
    "service_plan_url": "/v2/service_plans/51c13e3c-72ae-4881-a8ea-f2ddf34d801b",
    "service_bindings_url": "/v2/service_instances/07f0b519-9b6a-4e51-a305-58801e56d564/service_bindings"
  }
}