Home
Version 3
Service Plans API

Service Plans API

Updating a Service Plan

PUT /v2/service_plans

Request

Route

PUT /v2/service_plans/8c6b1ba3-bb7e-455f-a6e6-ecc20a158193

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

cURL

curl "https://api.[your-domain.com]/v2/service_plans/8c6b1ba3-bb7e-455f-a6e6-ecc20a158193" -d '{
  "public": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTc5IiwiZW1haWwiOiJlbWFpbC00OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYxOTU4MzkzfQ.SJp8nTCMG8HAcDbJBdPjJni3Q3i5I1EWYAz9xnP6aVo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "8c6b1ba3-bb7e-455f-a6e6-ecc20a158193",
    "url": "/v2/service_plans/8c6b1ba3-bb7e-455f-a6e6-ecc20a158193",
    "created_at": "2016-04-22T19:33:13Z",
    "updated_at": "2016-04-22T19:33:13Z"
  },
  "entity": {
    "name": "name-152",
    "free": false,
    "description": "desc-12",
    "service_guid": "a506a835-ebdb-47d6-b181-b822999d3992",
    "extra": null,
    "unique_id": "33ab7f80-2544-4031-b993-8d942cfe2b0a",
    "public": false,
    "active": true,
    "service_url": "/v2/services/a506a835-ebdb-47d6-b181-b822999d3992",
    "service_instances_url": "/v2/service_plans/8c6b1ba3-bb7e-455f-a6e6-ecc20a158193/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: aed0c884-d06e-43ae-b7a9-7d8ae74f6d9d
Content-Length: 672
X-Content-Type-Options: nosniff