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": "f38883d8-548b-4c71-921c-51c037cb4cb5",
  "organization_guid": "4374b81d-c2d9-41e5-8507-3554315cb151"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0NyIsImVtYWlsIjoiZW1haWwtMzE1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTJ9.puWdZ2Bbi8XkmJV7CWBRMXk_vAgwf57WMlOcZdbS0fo
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": "f38883d8-548b-4c71-921c-51c037cb4cb5",
  "organization_guid": "4374b81d-c2d9-41e5-8507-3554315cb151"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0NyIsImVtYWlsIjoiZW1haWwtMzE1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTJ9.puWdZ2Bbi8XkmJV7CWBRMXk_vAgwf57WMlOcZdbS0fo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b0bdf41e-caeb-4649-b4bd-eba5681f32a0",
    "url": "/v2/service_plan_visibilities/b0bdf41e-caeb-4649-b4bd-eba5681f32a0",
    "created_at": "2016-03-17T21:41:32Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "f38883d8-548b-4c71-921c-51c037cb4cb5",
    "organization_guid": "4374b81d-c2d9-41e5-8507-3554315cb151",
    "service_plan_url": "/v2/service_plans/f38883d8-548b-4c71-921c-51c037cb4cb5",
    "organization_url": "/v2/organizations/4374b81d-c2d9-41e5-8507-3554315cb151"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/b0bdf41e-caeb-4649-b4bd-eba5681f32a0
X-VCAP-Request-ID: 
Content-Length: 533
X-Content-Type-Options: nosniff