Home
Version 3
Service Plans API

Service Plans API

Updating a Service Plan (deprecated)

PUT /v2/service_plans

Request

Route

PUT /v2/service_plans/49846b81-7420-4d08-8170-a9de21f4eedc

Body

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
{
  "name": "100mb",
  "free": true,
  "description": "Let's you put data in your database!",
  "service_guid": "f0f5d875-6eee-4fa1-ad7a-4c47a65e0f3d"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MyIsImVtYWlsIjoiZW1haWwtMTI3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTZ9.uuJSpcGw5kWmvZ9CMSpk8C7U2OsqWAjGBw6R4qgGaaY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_plans/49846b81-7420-4d08-8170-a9de21f4eedc" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "f0f5d875-6eee-4fa1-ad7a-4c47a65e0f3d"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MyIsImVtYWlsIjoiZW1haWwtMTI3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTZ9.uuJSpcGw5kWmvZ9CMSpk8C7U2OsqWAjGBw6R4qgGaaY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "49846b81-7420-4d08-8170-a9de21f4eedc",
    "url": "/v2/service_plans/49846b81-7420-4d08-8170-a9de21f4eedc",
    "created_at": "2015-07-27T22:43:16Z",
    "updated_at": "2015-07-27T22:43:16Z"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "f0f5d875-6eee-4fa1-ad7a-4c47a65e0f3d",
    "extra": null,
    "unique_id": "2ed588a8-fc8c-444f-8f5e-8ad76e5c7f86",
    "public": true,
    "active": true,
    "service_url": "/v2/services/f0f5d875-6eee-4fa1-ad7a-4c47a65e0f3d",
    "service_instances_url": "/v2/service_plans/49846b81-7420-4d08-8170-a9de21f4eedc/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c5226a8f-59a9-4cf0-bf9f-d5bb9611a036
Content-Length: 696
X-Content-Type-Options: nosniff