Home
Version 3
Service Plans API

Service Plans API

Updating a Service Plan

PUT /v2/service_plans

Request

Route

PUT /v2/service_plans/078cb2c1-e036-4dca-a3b7-ad7f3f36f9cc

Body

Name Description Default Valid Values Example Values
guid The guid of the service plan
public A boolean describing that the plan is visible to the all users true
{
  "public": false
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2MiIsImVtYWlsIjoiZW1haWwtMTE3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTB9.FoO2-Tqze8qQEJ_ZelQEoKzTLxcM_8uFa1Vg5kQgrHU
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_plans/078cb2c1-e036-4dca-a3b7-ad7f3f36f9cc" -d '{
  "public": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2MiIsImVtYWlsIjoiZW1haWwtMTE3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTB9.FoO2-Tqze8qQEJ_ZelQEoKzTLxcM_8uFa1Vg5kQgrHU" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "078cb2c1-e036-4dca-a3b7-ad7f3f36f9cc",
    "url": "/v2/service_plans/078cb2c1-e036-4dca-a3b7-ad7f3f36f9cc",
    "created_at": "2016-06-08T16:41:30Z",
    "updated_at": "2016-06-08T16:41:30Z"
  },
  "entity": {
    "name": "name-1577",
    "free": false,
    "description": "desc-111",
    "service_guid": "518cf8f5-9002-4c63-aab1-6ad2737444b1",
    "extra": null,
    "unique_id": "f2c4842f-ae62-443f-a308-956d90431b87",
    "public": false,
    "active": true,
    "bindable": true,
    "service_url": "/v2/services/518cf8f5-9002-4c63-aab1-6ad2737444b1",
    "service_instances_url": "/v2/service_plans/078cb2c1-e036-4dca-a3b7-ad7f3f36f9cc/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 0db08b5d-0247-452e-8953-6561f781b365
Content-Length: 674
X-Content-Type-Options: nosniff