Home
Version 3
Service Plan Visibilities API

Service Plan Visibilities API

Creating a Service Plan Visibility

POST /v2/service_plan_visibilities

Fields

Name Description Default Valid Values Example Values
service_plan_guid The guid of the plan that will be made visible
organization_guid The guid of the organization the plan will be visible to

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0MyIsImVtYWlsIjoiZW1haWwtMTE2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNTl9.6dQFeaYvtvdmM7CV0yQbUGuIn0HmUwGMYuXRcJmOooc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/service_plan_visibilities

Body

{
  "service_plan_guid": "21636415-3c41-4853-85cd-92e84078cdde",
  "organization_guid": "b633b391-de56-43df-b5ac-0bb994fa42a6"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plan_visibilities" -d '{
  "service_plan_guid": "21636415-3c41-4853-85cd-92e84078cdde",
  "organization_guid": "b633b391-de56-43df-b5ac-0bb994fa42a6"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0MyIsImVtYWlsIjoiZW1haWwtMTE2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNTl9.6dQFeaYvtvdmM7CV0yQbUGuIn0HmUwGMYuXRcJmOooc" \
	-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_plan_visibilities/034b3c6f-e48a-4d42-acff-fba22d39302e
X-VCAP-Request-ID: 85d6ff08-a2ad-4b58-b886-2e1c05a8cf9b
Content-Length: 538
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "034b3c6f-e48a-4d42-acff-fba22d39302e",
    "url": "/v2/service_plan_visibilities/034b3c6f-e48a-4d42-acff-fba22d39302e",
    "created_at": "2014-11-24T19:32:39+00:00",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "21636415-3c41-4853-85cd-92e84078cdde",
    "organization_guid": "b633b391-de56-43df-b5ac-0bb994fa42a6",
    "service_plan_url": "/v2/service_plans/21636415-3c41-4853-85cd-92e84078cdde",
    "organization_url": "/v2/organizations/b633b391-de56-43df-b5ac-0bb994fa42a6"
  }
}