Home
Version 3
Service Plans API

Service Plans API

Updating a Service Plan (deprecated)

PUT /v2/service_plans

Request

Route

PUT /v2/service_plans/26016937-19cb-4087-a525-36aeda2d9a1a

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": "4a25d71a-d1e9-4539-b5fa-35fce27e4d5a"
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/service_plans/26016937-19cb-4087-a525-36aeda2d9a1a" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "4a25d71a-d1e9-4539-b5fa-35fce27e4d5a"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MyIsImVtYWlsIjoiZW1haWwtMTc1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NTd9.uTLkpj4zl7l0UXyAW67yWIWlqXe2wdoSJAdf1xQ2Aoc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "26016937-19cb-4087-a525-36aeda2d9a1a",
    "url": "/v2/service_plans/26016937-19cb-4087-a525-36aeda2d9a1a",
    "created_at": "2015-03-20T18:27:37Z",
    "updated_at": "2015-03-20T18:27:37Z"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "4a25d71a-d1e9-4539-b5fa-35fce27e4d5a",
    "extra": null,
    "unique_id": "b483b091-d5a1-4c8b-b040-f1c35c46ad4b",
    "public": true,
    "active": true,
    "service_url": "/v2/services/4a25d71a-d1e9-4539-b5fa-35fce27e4d5a",
    "service_instances_url": "/v2/service_plans/26016937-19cb-4087-a525-36aeda2d9a1a/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 24b762d7-984c-41d3-8ddb-32cec50c7c31
Content-Length: 696
X-Content-Type-Options: nosniff