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

Route

PUT /v2/service_plans/fd8341a4-2692-4cf3-b5d9-2f5640818256

Body

{
  "name": "100mb",
  "free": true,
  "description": "Let's you put data in your database!",
  "service_guid": "131565f2-0769-4d2f-b071-b1d5a711e250"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plans/fd8341a4-2692-4cf3-b5d9-2f5640818256" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "131565f2-0769-4d2f-b071-b1d5a711e250"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NSIsImVtYWlsIjoiZW1haWwtMjY4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5ODB9.FIsITDgb_SFFWf0wYxtHEVe09lbPcWQyKB4-_PZKjLA" \
	-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: 6a1930aa-8499-40da-8bfa-f8796ceb03fd
Content-Length: 706
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "fd8341a4-2692-4cf3-b5d9-2f5640818256",
    "url": "/v2/service_plans/fd8341a4-2692-4cf3-b5d9-2f5640818256",
    "created_at": "2014-12-24T01:39:40+00:00",
    "updated_at": "2014-12-24T01:39:40+00:00"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "131565f2-0769-4d2f-b071-b1d5a711e250",
    "extra": null,
    "unique_id": "37ca0249-7d49-4d33-ac79-56af2c2aa808",
    "public": true,
    "active": true,
    "service_url": "/v2/services/131565f2-0769-4d2f-b071-b1d5a711e250",
    "service_instances_url": "/v2/service_plans/fd8341a4-2692-4cf3-b5d9-2f5640818256/service_instances"
  }
}