Home
Version 3
Service Plans API

Service Plans API

Creating a Service Plan (deprecated)

POST /v2/service_plans

Fields

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MyIsImVtYWlsIjoiZW1haWwtMTc1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE2OTl9.5B-hkmzrfeWj-B39_vF2OJjGnxi6PRF1p2yJY-OfZPo
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/service_plans

Body

{
  "name": "100mb",
  "free": true,
  "description": "Let's you put data in your database!",
  "service_guid": "71c18c8d-9169-4dca-948d-16e78e5435cb"
}

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": "71c18c8d-9169-4dca-948d-16e78e5435cb"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MyIsImVtYWlsIjoiZW1haWwtMTc1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE2OTl9.5B-hkmzrfeWj-B39_vF2OJjGnxi6PRF1p2yJY-OfZPo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plans/f824a074-38d6-4d84-b1a8-adb359af733b
X-VCAP-Request-ID: a92b8c5e-d55a-4c76-acbb-6964941f9725
Content-Length: 678
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "f824a074-38d6-4d84-b1a8-adb359af733b",
    "url": "/v2/service_plans/f824a074-38d6-4d84-b1a8-adb359af733b",
    "created_at": "2015-02-13T22:34:59Z",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "71c18c8d-9169-4dca-948d-16e78e5435cb",
    "extra": null,
    "unique_id": "77502d55-bffb-4b39-a1f1-1a9da233d0f9",
    "public": true,
    "active": true,
    "service_url": "/v2/services/71c18c8d-9169-4dca-948d-16e78e5435cb",
    "service_instances_url": "/v2/service_plans/f824a074-38d6-4d84-b1a8-adb359af733b/service_instances"
  }
}