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

Route

PUT /v2/service_plans/084c2793-96c4-4e5e-ae4d-ab0bfbef4ad3

Body

{
  "name": "100mb",
  "free": true,
  "description": "Let's you put data in your database!",
  "service_guid": "f7743bfa-17f2-44d1-abb3-3dee644e6a0e"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plans/084c2793-96c4-4e5e-ae4d-ab0bfbef4ad3" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "f7743bfa-17f2-44d1-abb3-3dee644e6a0e"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNyIsImVtYWlsIjoiZW1haWwtMTUxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MDV9.9lMXzIidmZoXUNqXjLZV17tI2WecgFOKvXHbr3X7r8w" \
	-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: 27b37d35-ca15-43bc-8c76-257b65540fbf
Content-Length: 706
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "084c2793-96c4-4e5e-ae4d-ab0bfbef4ad3",
    "url": "/v2/service_plans/084c2793-96c4-4e5e-ae4d-ab0bfbef4ad3",
    "created_at": "2014-11-13T23:38:25+00:00",
    "updated_at": "2014-11-13T23:38:25+00:00"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "f7743bfa-17f2-44d1-abb3-3dee644e6a0e",
    "extra": null,
    "unique_id": "a65478b3-261a-42f4-bc71-bf242ea7bf8c",
    "public": true,
    "active": true,
    "service_url": "/v2/services/f7743bfa-17f2-44d1-abb3-3dee644e6a0e",
    "service_instances_url": "/v2/service_plans/084c2793-96c4-4e5e-ae4d-ab0bfbef4ad3/service_instances"
  }
}