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.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NiIsImVtYWlsIjoiZW1haWwtMjY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5ODB9.AQlBtZo25CotkZ7pJZ5C3DTQRRiOk-r0HjGZSp1vQlY
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": "1775ca56-571a-4d34-a8b1-47f44e384306"
}

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": "1775ca56-571a-4d34-a8b1-47f44e384306"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NiIsImVtYWlsIjoiZW1haWwtMjY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5ODB9.AQlBtZo25CotkZ7pJZ5C3DTQRRiOk-r0HjGZSp1vQlY" \
	-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/9d033228-d4c9-4039-a5d2-6013d2e0bdf8
X-VCAP-Request-ID: bacc4a42-ce0d-413a-830a-240febb41f6b
Content-Length: 683
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "9d033228-d4c9-4039-a5d2-6013d2e0bdf8",
    "url": "/v2/service_plans/9d033228-d4c9-4039-a5d2-6013d2e0bdf8",
    "created_at": "2014-12-24T01:39:40+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "1775ca56-571a-4d34-a8b1-47f44e384306",
    "extra": null,
    "unique_id": "adde6e65-a657-4bf7-8dab-27f2bac90375",
    "public": true,
    "active": true,
    "service_url": "/v2/services/1775ca56-571a-4d34-a8b1-47f44e384306",
    "service_instances_url": "/v2/service_plans/9d033228-d4c9-4039-a5d2-6013d2e0bdf8/service_instances"
  }
}