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": "d5230aa7-fb32-4118-9061-d7b216c04e6d"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3NiIsImVtYWlsIjoiZW1haWwtMjc2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNTF9.fbsHv-trwRwoPdtKCXbUUBjuP1wRZsCFhvrnahGb4jw
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": "d5230aa7-fb32-4118-9061-d7b216c04e6d"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3NiIsImVtYWlsIjoiZW1haWwtMjc2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNTF9.fbsHv-trwRwoPdtKCXbUUBjuP1wRZsCFhvrnahGb4jw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "608d02f8-2b26-42b5-b055-fbbb0be3216c",
    "url": "/v2/service_plans/608d02f8-2b26-42b5-b055-fbbb0be3216c",
    "created_at": "2015-04-15T00:55:51Z",
    "updated_at": null
  },
  "entity": {
    "name": "100mb",
    "free": true,
    "description": "Let's you put data in your database!",
    "service_guid": "d5230aa7-fb32-4118-9061-d7b216c04e6d",
    "extra": null,
    "unique_id": "20116868-eb13-4b6c-a2e7-2c2a97124c5c",
    "public": true,
    "active": true,
    "service_url": "/v2/services/d5230aa7-fb32-4118-9061-d7b216c04e6d",
    "service_instances_url": "/v2/service_plans/608d02f8-2b26-42b5-b055-fbbb0be3216c/service_instances"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plans/608d02f8-2b26-42b5-b055-fbbb0be3216c
X-VCAP-Request-ID: d9a94f0c-5d42-4ec1-af8a-b6514f0a8c50
Content-Length: 678
X-Content-Type-Options: nosniff