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.eyJ1c2VyX2lkIjoidWFhLWlkLTE5OCIsImVtYWlsIjoiZW1haWwtMTcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjN9.qsp2q5yv1KyMNbhnZ8v9krbdlHYj1MLcEU2J7tC7Nl0
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": "d8872079-fe36-458a-b5b9-e38e7eab2731"
}

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": "d8872079-fe36-458a-b5b9-e38e7eab2731"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5OCIsImVtYWlsIjoiZW1haWwtMTcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjN9.qsp2q5yv1KyMNbhnZ8v9krbdlHYj1MLcEU2J7tC7Nl0" \
	-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/2e16ef1b-30ee-44ef-9955-56bf6dc364a4
X-VCAP-Request-ID: 36f6820b-5576-46e2-877d-5db651db8f6c
Content-Length: 683
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "2e16ef1b-30ee-44ef-9955-56bf6dc364a4",
    "url": "/v2/service_plans/2e16ef1b-30ee-44ef-9955-56bf6dc364a4",
    "created_at": "2014-11-24T19:32:43+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "d8872079-fe36-458a-b5b9-e38e7eab2731",
    "extra": null,
    "unique_id": "65867c94-559b-4e51-8273-b153fe93bdc8",
    "public": true,
    "active": true,
    "service_url": "/v2/services/d8872079-fe36-458a-b5b9-e38e7eab2731",
    "service_instances_url": "/v2/service_plans/2e16ef1b-30ee-44ef-9955-56bf6dc364a4/service_instances"
  }
}