Home
Version 3
Service Plans API

Service Plans API

Updating a Service Plan (deprecated)

PUT /v2/service_plans

Request

Route

PUT /v2/service_plans/187604f8-d99b-4327-bcfa-1801c9da1141

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": "538cd97a-3895-44cc-b686-026dc8a3292f"
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/service_plans/187604f8-d99b-4327-bcfa-1801c9da1141" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "538cd97a-3895-44cc-b686-026dc8a3292f"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3NSIsImVtYWlsIjoiZW1haWwtMjIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5OTV9.osGeZsPgei4xMU4J_2eCeAlUpfDG9663mO643Y_QhKA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "187604f8-d99b-4327-bcfa-1801c9da1141",
    "url": "/v2/service_plans/187604f8-d99b-4327-bcfa-1801c9da1141",
    "created_at": "2015-05-21T01:03:15Z",
    "updated_at": "2015-05-21T01:03:15Z"
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "538cd97a-3895-44cc-b686-026dc8a3292f",
    "extra": null,
    "unique_id": "4fad9862-fbf9-4d63-b276-8e1fea7acbbe",
    "public": true,
    "active": true,
    "service_url": "/v2/services/538cd97a-3895-44cc-b686-026dc8a3292f",
    "service_instances_url": "/v2/service_plans/187604f8-d99b-4327-bcfa-1801c9da1141/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: fba9260c-6294-4a1e-8437-51cfbf907793
Content-Length: 696
X-Content-Type-Options: nosniff