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": "1ba25196-f236-43ae-b212-de39f4823e42"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMyIsImVtYWlsIjoiZW1haWwtMjYwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2NDV9.8rBdMHMMtVVq6cxJynb-bb5R6U8tZyqo99ZuAlygIWo
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": "1ba25196-f236-43ae-b212-de39f4823e42"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzMyIsImVtYWlsIjoiZW1haWwtMjYwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2NDV9.8rBdMHMMtVVq6cxJynb-bb5R6U8tZyqo99ZuAlygIWo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "d8e7ff9a-b86a-47ed-8da7-3c735e0e6110",
    "url": "/v2/service_plans/d8e7ff9a-b86a-47ed-8da7-3c735e0e6110",
    "created_at": "2015-05-07T23:37:25Z",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "1ba25196-f236-43ae-b212-de39f4823e42",
    "extra": null,
    "unique_id": "e60a2892-3404-46e3-b92c-a57d27c86481",
    "public": true,
    "active": true,
    "service_url": "/v2/services/1ba25196-f236-43ae-b212-de39f4823e42",
    "service_instances_url": "/v2/service_plans/d8e7ff9a-b86a-47ed-8da7-3c735e0e6110/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plans/d8e7ff9a-b86a-47ed-8da7-3c735e0e6110
X-VCAP-Request-ID: ab8b0c7f-0776-4208-93db-e2f1902497e8
Content-Length: 678
X-Content-Type-Options: nosniff