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

Route

PUT /v2/service_plans/909b793a-7ec0-4d66-9eb5-aaffa3c5586f

Body

{
  "name": "100mb",
  "free": true,
  "description": "Let's you put data in your database!",
  "service_guid": "3af56769-8d78-4d4f-a6c8-fa92dfc5ed34"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plans/909b793a-7ec0-4d66-9eb5-aaffa3c5586f" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "3af56769-8d78-4d4f-a6c8-fa92dfc5ed34"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwMCIsImVtYWlsIjoiZW1haWwtMTczQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjN9.YiC2xQQywvzuFdSFfjeWOJ68wKHKBp0EpHaR0qGpbfU" \
	-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: 67781201-8d6c-45c1-b3fe-2175af513bd1
Content-Length: 706
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "909b793a-7ec0-4d66-9eb5-aaffa3c5586f",
    "url": "/v2/service_plans/909b793a-7ec0-4d66-9eb5-aaffa3c5586f",
    "created_at": "2014-11-24T19:32:43+00:00",
    "updated_at": "2014-11-24T19:32:43+00:00"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "3af56769-8d78-4d4f-a6c8-fa92dfc5ed34",
    "extra": null,
    "unique_id": "e394f9d1-8125-4dd6-907a-eccef46ab005",
    "public": true,
    "active": true,
    "service_url": "/v2/services/3af56769-8d78-4d4f-a6c8-fa92dfc5ed34",
    "service_instances_url": "/v2/service_plans/909b793a-7ec0-4d66-9eb5-aaffa3c5586f/service_instances"
  }
}