Home
Version 3
Service Plans API

Service Plans API

Updating a Service Plan (deprecated)

PUT /v2/service_plans

Request

Route

PUT /v2/service_plans/eb7a17ca-137f-487e-84e8-ed932a83dd71

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": "35e1c027-8f75-4f2c-8f1b-206b607c22c7"
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/service_plans/eb7a17ca-137f-487e-84e8-ed932a83dd71" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "35e1c027-8f75-4f2c-8f1b-206b607c22c7"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3NyIsImVtYWlsIjoiZW1haWwtMjc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNTF9.Vx3ySlCfEFzsHkLuJ_BBG6i6_CSmQjS596RjqExqq1c" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "eb7a17ca-137f-487e-84e8-ed932a83dd71",
    "url": "/v2/service_plans/eb7a17ca-137f-487e-84e8-ed932a83dd71",
    "created_at": "2015-04-15T00:55:51Z",
    "updated_at": "2015-04-15T00:55:51Z"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "35e1c027-8f75-4f2c-8f1b-206b607c22c7",
    "extra": null,
    "unique_id": "3a85691b-33ba-4315-93de-64db66599251",
    "public": true,
    "active": true,
    "service_url": "/v2/services/35e1c027-8f75-4f2c-8f1b-206b607c22c7",
    "service_instances_url": "/v2/service_plans/eb7a17ca-137f-487e-84e8-ed932a83dd71/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 81fb3b77-ec84-471b-a0b9-c8617d3f0119
Content-Length: 696
X-Content-Type-Options: nosniff