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": "55e99480-f419-4e40-8b87-a7c09d6d57b5"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5MyIsImVtYWlsIjoiZW1haWwtMjYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDN9.54bEe-JlWF8ImjbOaukgnEKaOK0JYitSpS2a47LI0M0
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": "55e99480-f419-4e40-8b87-a7c09d6d57b5"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5MyIsImVtYWlsIjoiZW1haWwtMjYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDN9.54bEe-JlWF8ImjbOaukgnEKaOK0JYitSpS2a47LI0M0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "5c28380b-33b4-4519-88ce-32d31eb458eb",
    "url": "/v2/service_plans/5c28380b-33b4-4519-88ce-32d31eb458eb",
    "created_at": "2015-10-07T00:35:43Z",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "55e99480-f419-4e40-8b87-a7c09d6d57b5",
    "extra": null,
    "unique_id": "208b30a5-c0bf-42b2-8f1b-c3fd5bca705e",
    "public": true,
    "active": true,
    "service_url": "/v2/services/55e99480-f419-4e40-8b87-a7c09d6d57b5",
    "service_instances_url": "/v2/service_plans/5c28380b-33b4-4519-88ce-32d31eb458eb/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plans/5c28380b-33b4-4519-88ce-32d31eb458eb
X-VCAP-Request-ID: dae3e88e-a201-4a1b-a71c-58e151344746
Content-Length: 678
X-Content-Type-Options: nosniff