Home
Version 3
Service Plans API

Service Plans API

Updating a Service Plan (deprecated)

PUT /v2/service_plans

Fields

Name Description Default Valid Values Example Values
guid The guid of the service plan
name The name of the service plan
  • 100mb
free A boolean describing if the service plan is free
  • true
  • false
description A description of the service plan
  • Let's you put data in your database!
extra A JSON string with additional data about the plan
  • {"cost": "$2.00"}
unique_id A guid for the service plan in the service broker (not the same as the cloud controller guid)
public A boolean describing that the plan is visible to the all users true
service_guid The guid of the related service
  • deadbeef
active A boolean that determines whether plans can be used to create new instances.
  • true
  • false

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4IiwiZW1haWwiOiJlbWFpbC0xOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MTM3MzYyfQ.d1d13hItd-6oZ4xWy-u7AjMGbo4D3awECuO3Hx-icjw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/service_plans/129e6a3f-f790-4bbf-b084-4bd44d12181b

Body

{
  "name": "100mb",
  "free": true,
  "description": "Let's you put data in your database!",
  "service_guid": "b0c01819-e1e9-46a3-82a6-798e619ed622"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plans/129e6a3f-f790-4bbf-b084-4bd44d12181b" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "b0c01819-e1e9-46a3-82a6-798e619ed622"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4IiwiZW1haWwiOiJlbWFpbC0xOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MTM3MzYyfQ.d1d13hItd-6oZ4xWy-u7AjMGbo4D3awECuO3Hx-icjw" \
	-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: fa24b867-02da-4054-a49e-230591b8c29f
Content-Length: 696
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "129e6a3f-f790-4bbf-b084-4bd44d12181b",
    "url": "/v2/service_plans/129e6a3f-f790-4bbf-b084-4bd44d12181b",
    "created_at": "2015-02-10T01:42:42Z",
    "updated_at": "2015-02-10T01:42:42Z"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "b0c01819-e1e9-46a3-82a6-798e619ed622",
    "extra": null,
    "unique_id": "772ba55b-4f57-427c-be1f-97f7eba54f41",
    "public": true,
    "active": true,
    "service_url": "/v2/services/b0c01819-e1e9-46a3-82a6-798e619ed622",
    "service_instances_url": "/v2/service_plans/129e6a3f-f790-4bbf-b084-4bd44d12181b/service_instances"
  }
}