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

Route

PUT /v2/service_plans/25d9e95e-052f-42ef-b81f-5ee7f68bc43e

Body

{
  "name": "100mb",
  "free": true,
  "description": "Let's you put data in your database!",
  "service_guid": "cc0914eb-22f8-44e5-af94-6e9fc826af33"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plans/25d9e95e-052f-42ef-b81f-5ee7f68bc43e" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "cc0914eb-22f8-44e5-af94-6e9fc826af33"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTg5IiwiZW1haWwiOiJlbWFpbC02MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MzEwMTIzfQ.tC-ZAjgL8qSYi2Vqxfpst3dUF7LpYAptIPpK3aKsHsE" \
	-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: 5e47c26e-b8ac-4b29-b2cd-d25cf9d259f0
Content-Length: 696
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "25d9e95e-052f-42ef-b81f-5ee7f68bc43e",
    "url": "/v2/service_plans/25d9e95e-052f-42ef-b81f-5ee7f68bc43e",
    "created_at": "2015-02-12T01:42:02Z",
    "updated_at": "2015-02-12T01:42:02Z"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "cc0914eb-22f8-44e5-af94-6e9fc826af33",
    "extra": null,
    "unique_id": "8d4cc3e4-f698-4e58-8c46-8ca4be9e66a8",
    "public": true,
    "active": true,
    "service_url": "/v2/services/cc0914eb-22f8-44e5-af94-6e9fc826af33",
    "service_instances_url": "/v2/service_plans/25d9e95e-052f-42ef-b81f-5ee7f68bc43e/service_instances"
  }
}