Home
Version 3
Service Plans API

Service Plans API

Updating a Service Plan (deprecated)

PUT /v2/service_plans

Request

Route

PUT /v2/service_plans/5187f450-2fff-4ece-a3b8-83d5389da380

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": "0ea30c3d-9bb1-44cd-a651-ebd39243e96d"
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/service_plans/5187f450-2fff-4ece-a3b8-83d5389da380" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "0ea30c3d-9bb1-44cd-a651-ebd39243e96d"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4MiIsImVtYWlsIjoiZW1haWwtMjc0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTl9.S2Zw5RJP2Y02_CNMUGJ0DXe5RX3B3yuZXX0gKxO9PgY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "5187f450-2fff-4ece-a3b8-83d5389da380",
    "url": "/v2/service_plans/5187f450-2fff-4ece-a3b8-83d5389da380",
    "created_at": "2015-07-06T23:23:19Z",
    "updated_at": "2015-07-06T23:23:19Z"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "0ea30c3d-9bb1-44cd-a651-ebd39243e96d",
    "extra": null,
    "unique_id": "fd211b0d-d51f-437f-9433-841307421165",
    "public": true,
    "active": true,
    "service_url": "/v2/services/0ea30c3d-9bb1-44cd-a651-ebd39243e96d",
    "service_instances_url": "/v2/service_plans/5187f450-2fff-4ece-a3b8-83d5389da380/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d8d35c6e-bdea-4ef2-8032-084accc4d1a5
Content-Length: 696
X-Content-Type-Options: nosniff