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.eyJ1c2VyX2lkIjoidWFhLWlkLTc1IiwiZW1haWwiOiJlbWFpbC00NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyMzIzNTMyfQ.OeCELA-bDEJlFQKmAc0sGzJTJR4agFg5I6vvEtTSvic
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/service_plans/884a8a70-96a6-4741-afed-8d8cb0b669c6

Body

{
  "name": "100mb",
  "free": true,
  "description": "Let's you put data in your database!",
  "service_guid": "1d964a69-4b74-4cd1-bee0-786eda444cdd"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plans/884a8a70-96a6-4741-afed-8d8cb0b669c6" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "1d964a69-4b74-4cd1-bee0-786eda444cdd"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTc1IiwiZW1haWwiOiJlbWFpbC00NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDIyMzIzNTMyfQ.OeCELA-bDEJlFQKmAc0sGzJTJR4agFg5I6vvEtTSvic" \
	-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: 0a889f4d-88eb-4688-88c2-6efb389d4862
Content-Length: 706
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "884a8a70-96a6-4741-afed-8d8cb0b669c6",
    "url": "/v2/service_plans/884a8a70-96a6-4741-afed-8d8cb0b669c6",
    "created_at": "2015-01-20T01:52:12+00:00",
    "updated_at": "2015-01-20T01:52:12+00:00"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "1d964a69-4b74-4cd1-bee0-786eda444cdd",
    "extra": null,
    "unique_id": "baa2f571-ee1e-4271-a822-f0feaf2c1610",
    "public": true,
    "active": true,
    "service_url": "/v2/services/1d964a69-4b74-4cd1-bee0-786eda444cdd",
    "service_instances_url": "/v2/service_plans/884a8a70-96a6-4741-afed-8d8cb0b669c6/service_instances"
  }
}