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": "8515f304-e779-425d-86f0-9333f978e8de"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2NiIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTJ9.mlmG3Jtl4MH0em80QLNKGwSJDleffYHxl9UhYrfDH4E
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": "8515f304-e779-425d-86f0-9333f978e8de"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2NiIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTJ9.mlmG3Jtl4MH0em80QLNKGwSJDleffYHxl9UhYrfDH4E" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c3f8d0c2-192a-4134-af80-16a2275ccbe6",
    "url": "/v2/service_plans/c3f8d0c2-192a-4134-af80-16a2275ccbe6",
    "created_at": "2015-06-04T00:05:12Z",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "8515f304-e779-425d-86f0-9333f978e8de",
    "extra": null,
    "unique_id": "2f19af9c-46a7-43a3-acd5-2294c6648ad4",
    "public": true,
    "active": true,
    "service_url": "/v2/services/8515f304-e779-425d-86f0-9333f978e8de",
    "service_instances_url": "/v2/service_plans/c3f8d0c2-192a-4134-af80-16a2275ccbe6/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plans/c3f8d0c2-192a-4134-af80-16a2275ccbe6
X-VCAP-Request-ID: 8e100b20-5d98-4992-b39b-6be56dcae723
Content-Length: 678
X-Content-Type-Options: nosniff