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": "605c70c4-dbb0-4617-a62b-938e2ac303dc"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2NiIsImVtYWlsIjoiZW1haWwtMzM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NjV9.jPR-C0ZcaEVYurYf0uUjCMJdnPeF4P8pKbpVS6BUzx8
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": "605c70c4-dbb0-4617-a62b-938e2ac303dc"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2NiIsImVtYWlsIjoiZW1haWwtMzM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NjV9.jPR-C0ZcaEVYurYf0uUjCMJdnPeF4P8pKbpVS6BUzx8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b7359b98-8dcc-4d67-95a8-80e461d68bbd",
    "url": "/v2/service_plans/b7359b98-8dcc-4d67-95a8-80e461d68bbd",
    "created_at": "2015-09-30T23:31:05Z",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "605c70c4-dbb0-4617-a62b-938e2ac303dc",
    "extra": null,
    "unique_id": "a735ca9f-0285-4db8-ae93-9464af4fc9bf",
    "public": true,
    "active": true,
    "service_url": "/v2/services/605c70c4-dbb0-4617-a62b-938e2ac303dc",
    "service_instances_url": "/v2/service_plans/b7359b98-8dcc-4d67-95a8-80e461d68bbd/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plans/b7359b98-8dcc-4d67-95a8-80e461d68bbd
X-VCAP-Request-ID: 0dceeba3-cd4b-4464-91fb-6515be9c2093
Content-Length: 678
X-Content-Type-Options: nosniff