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": "ab5780a9-ac8e-4412-9496-4512e865011a",
  "organization_guid": "55d0ff39-dac9-431f-ba6d-83f37381f1c3"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NiIsImVtYWlsIjoiZW1haWwtMTIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTF9.ekbGeGWE6KvbEBH-IcvRj1f5j2yonbeKQqq2M8vMjvA
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_plan_visibilities" -d '{
  "service_plan_guid": "ab5780a9-ac8e-4412-9496-4512e865011a",
  "organization_guid": "55d0ff39-dac9-431f-ba6d-83f37381f1c3"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NiIsImVtYWlsIjoiZW1haWwtMTIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTF9.ekbGeGWE6KvbEBH-IcvRj1f5j2yonbeKQqq2M8vMjvA" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f740b01a-4afe-4435-aedd-0a8308a7e7d6",
    "url": "/v2/service_plan_visibilities/f740b01a-4afe-4435-aedd-0a8308a7e7d6",
    "created_at": "2016-06-08T16:41:31Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "service_plan_guid": "ab5780a9-ac8e-4412-9496-4512e865011a",
    "organization_guid": "55d0ff39-dac9-431f-ba6d-83f37381f1c3",
    "service_plan_url": "/v2/service_plans/ab5780a9-ac8e-4412-9496-4512e865011a",
    "organization_url": "/v2/organizations/55d0ff39-dac9-431f-ba6d-83f37381f1c3"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/f740b01a-4afe-4435-aedd-0a8308a7e7d6
X-VCAP-Request-ID: dad3dba1-c00c-404d-9aaf-2f144a474c66
Content-Length: 533
X-Content-Type-Options: nosniff