Home
Version 3
Service Plan Visibilities API

Service Plan Visibilities API

Creating a Service Plan Visibility

POST /v2/service_plan_visibilities

Request

Route

POST /v2/service_plan_visibilities

Body

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
{
  "service_plan_guid": "309eac76-4419-4367-82aa-48d94b814310",
  "organization_guid": "5986ca10-0bad-420e-a07a-ca5182faa128"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxMSIsImVtYWlsIjoiZW1haWwtMjgyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2OTl9.47mfUHSoA12C9fjMC7Qci-GZ1WU7hjWJ0MfJuqK9ZbU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_plan_visibilities" -d '{
  "service_plan_guid": "309eac76-4419-4367-82aa-48d94b814310",
  "organization_guid": "5986ca10-0bad-420e-a07a-ca5182faa128"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxMSIsImVtYWlsIjoiZW1haWwtMjgyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2OTl9.47mfUHSoA12C9fjMC7Qci-GZ1WU7hjWJ0MfJuqK9ZbU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "8cb0b9ff-3c83-4b76-b2a4-13fd8350bad4",
    "url": "/v2/service_plan_visibilities/8cb0b9ff-3c83-4b76-b2a4-13fd8350bad4",
    "created_at": "2015-12-22T18:28:18Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "309eac76-4419-4367-82aa-48d94b814310",
    "organization_guid": "5986ca10-0bad-420e-a07a-ca5182faa128",
    "service_plan_url": "/v2/service_plans/309eac76-4419-4367-82aa-48d94b814310",
    "organization_url": "/v2/organizations/5986ca10-0bad-420e-a07a-ca5182faa128"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/8cb0b9ff-3c83-4b76-b2a4-13fd8350bad4
X-VCAP-Request-ID: 
Content-Length: 533
X-Content-Type-Options: nosniff