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": "90d82283-f708-469a-a0ca-c44faeb419d7"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2IiwiZW1haWwiOiJlbWFpbC00NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM1MTAyODQ3fQ.KVLZSzMo6soUa6CuK40gmyRK49F4xGZ5bmAJH-OiGvw
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": "90d82283-f708-469a-a0ca-c44faeb419d7"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2IiwiZW1haWwiOiJlbWFpbC00NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM1MTAyODQ3fQ.KVLZSzMo6soUa6CuK40gmyRK49F4xGZ5bmAJH-OiGvw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "5f489417-6c70-4cf0-b5ec-d06969d1413f",
    "url": "/v2/service_plans/5f489417-6c70-4cf0-b5ec-d06969d1413f",
    "created_at": "2015-06-16T23:40:47Z",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "90d82283-f708-469a-a0ca-c44faeb419d7",
    "extra": null,
    "unique_id": "c37f6fe4-eaf4-47ca-9329-061114fccc95",
    "public": true,
    "active": true,
    "service_url": "/v2/services/90d82283-f708-469a-a0ca-c44faeb419d7",
    "service_instances_url": "/v2/service_plans/5f489417-6c70-4cf0-b5ec-d06969d1413f/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plans/5f489417-6c70-4cf0-b5ec-d06969d1413f
X-VCAP-Request-ID: 9fd664bb-7e8a-4cb4-86f9-07c144554e29
Content-Length: 678
X-Content-Type-Options: nosniff