Home
Version 3
Service Plans API

Service Plans API

Creating a Service Plan (deprecated)

POST /v2/service_plans

Request

Route

POST /v2/service_plans

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": "079b8563-c1a8-4ab0-a0da-da2e1341c1fe"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyNCIsImVtYWlsIjoiZW1haWwtOTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNjE4Nzc0M30.3VuQ69C3aGBZXEzKYFYC8kpeh7DtHUk3lufp2NudpVM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_plans" -d '{
  "name": "100mb",
  "free": true,
  "description": "Let\u0027s you put data in your database!",
  "service_guid": "079b8563-c1a8-4ab0-a0da-da2e1341c1fe"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyNCIsImVtYWlsIjoiZW1haWwtOTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNjE4Nzc0M30.3VuQ69C3aGBZXEzKYFYC8kpeh7DtHUk3lufp2NudpVM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "fe7b92a0-5838-4d0a-9ee8-6a0b07ce8ee5",
    "url": "/v2/service_plans/fe7b92a0-5838-4d0a-9ee8-6a0b07ce8ee5",
    "created_at": "2015-03-05T19:15:43Z",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "079b8563-c1a8-4ab0-a0da-da2e1341c1fe",
    "extra": null,
    "unique_id": "59ba6b86-eb88-4041-8759-ff9cb8d112c8",
    "public": true,
    "active": true,
    "service_url": "/v2/services/079b8563-c1a8-4ab0-a0da-da2e1341c1fe",
    "service_instances_url": "/v2/service_plans/fe7b92a0-5838-4d0a-9ee8-6a0b07ce8ee5/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plans/fe7b92a0-5838-4d0a-9ee8-6a0b07ce8ee5
X-VCAP-Request-ID: 2c19121a-c984-4671-a589-2f9224f6d612
Content-Length: 678
X-Content-Type-Options: nosniff