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": "1897bb12-ab16-4134-880a-bec1e37b50e2"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MiIsImVtYWlsIjoiZW1haWwtMTI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTZ9.rl3XYenX4D17JRiXmVyszr_QXSH8rzOnrWF_am7lOHg
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": "1897bb12-ab16-4134-880a-bec1e37b50e2"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MiIsImVtYWlsIjoiZW1haWwtMTI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTZ9.rl3XYenX4D17JRiXmVyszr_QXSH8rzOnrWF_am7lOHg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "efd6028b-09d6-4f2d-8013-09eb29ca20b9",
    "url": "/v2/service_plans/efd6028b-09d6-4f2d-8013-09eb29ca20b9",
    "created_at": "2015-07-27T22:43:16Z",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "1897bb12-ab16-4134-880a-bec1e37b50e2",
    "extra": null,
    "unique_id": "7c1e99b2-e174-4310-88b5-143081ccb411",
    "public": true,
    "active": true,
    "service_url": "/v2/services/1897bb12-ab16-4134-880a-bec1e37b50e2",
    "service_instances_url": "/v2/service_plans/efd6028b-09d6-4f2d-8013-09eb29ca20b9/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plans/efd6028b-09d6-4f2d-8013-09eb29ca20b9
X-VCAP-Request-ID: c027cef7-1121-488b-be90-30a57c9e7c87
Content-Length: 678
X-Content-Type-Options: nosniff