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

Route

PUT /v2/service_plans/6523c5be-5d83-48db-98f1-a0fa59140728

Body

{
  "name": "100mb",
  "free": true,
  "description": "Let's you put data in your database!",
  "service_guid": "b49a080e-d314-4bd7-80a5-9af23b9f0c2d"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plans/6523c5be-5d83-48db-98f1-a0fa59140728" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "b49a080e-d314-4bd7-80a5-9af23b9f0c2d"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MSIsImVtYWlsIjoiZW1haWwtMTczQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE2OTl9.Bka0kH47DOvVFTXi_6LrrXI9OjGsCgmrH3GRhWECYNs" \
	-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: 8d29cf26-d05a-40f3-8cdd-e2297b1d6d80
Content-Length: 696
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "6523c5be-5d83-48db-98f1-a0fa59140728",
    "url": "/v2/service_plans/6523c5be-5d83-48db-98f1-a0fa59140728",
    "created_at": "2015-02-13T22:34:59Z",
    "updated_at": "2015-02-13T22:34:59Z"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "b49a080e-d314-4bd7-80a5-9af23b9f0c2d",
    "extra": null,
    "unique_id": "e9c28d4a-c4d0-480c-9666-8038520ff6ab",
    "public": true,
    "active": true,
    "service_url": "/v2/services/b49a080e-d314-4bd7-80a5-9af23b9f0c2d",
    "service_instances_url": "/v2/service_plans/6523c5be-5d83-48db-98f1-a0fa59140728/service_instances"
  }
}