Home
Version 3
Service Instances API

Service Instances API

Updating a service instance

PUT /v2/service_instances/:guid

Fields

Name Description Default Valid Values Example Values
name The new name for the service instance
  • my-new-service-instance
service_plan_guid The new plan guid for the service instance
  • 6c4bd80f-4593-41d1-a2c9-b20cb65ec76e

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk4IiwiZW1haWwiOiJlbWFpbC02OUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MzEwMTI0fQ.zhd6aL2biDVL1IyLCA_WkzODpwshzEPypw88puv6YvM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/service_instances/d0981941-092d-459c-bff8-e47f39054e68

Body

{"service_plan_guid":"d25ad128-b35f-4961-802e-fbe664ca5446"}

cURL

curl "https://api.[your-domain.com]/v2/service_instances/d0981941-092d-459c-bff8-e47f39054e68" -d '{"service_plan_guid":"d25ad128-b35f-4961-802e-fbe664ca5446"}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk4IiwiZW1haWwiOiJlbWFpbC02OUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MzEwMTI0fQ.zhd6aL2biDVL1IyLCA_WkzODpwshzEPypw88puv6YvM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ba1893e9-0bf5-40c1-b14a-de7bdfe6b77d
Content-Length: 964
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "d0981941-092d-459c-bff8-e47f39054e68",
    "url": "/v2/service_instances/d0981941-092d-459c-bff8-e47f39054e68",
    "created_at": "2015-02-12T01:42:03Z",
    "updated_at": "2015-02-12T01:42:03Z"
  },
  "entity": {
    "name": "name-369",
    "credentials": {
      "creds-key-150": "creds-val-150"
    },
    "service_plan_guid": "d25ad128-b35f-4961-802e-fbe664ca5446",
    "space_guid": "1d35d67c-0a18-460d-add5-64ed76b44cdd",
    "gateway_data": null,
    "dashboard_url": null,
    "type": "managed_service_instance",
    "last_operation": {
      "type": "update",
      "state": "succeeded",
      "description": "",
      "updated_at": "2015-02-12T01:42:03Z"
    },
    "space_url": "/v2/spaces/1d35d67c-0a18-460d-add5-64ed76b44cdd",
    "service_plan_url": "/v2/service_plans/d25ad128-b35f-4961-802e-fbe664ca5446",
    "service_bindings_url": "/v2/service_instances/d0981941-092d-459c-bff8-e47f39054e68/service_bindings"
  }
}