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": "95ce8344-8fde-405b-b3b6-f16f4e94e1f2",
  "organization_guid": "966ed77a-8f48-4f98-9337-1197e1b7a8ac"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MCIsImVtYWlsIjoiZW1haWwtMjExQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDV9.S9n4pEwM1Y7Sx8O92ycV_YPJ0QD_5HhQOkOUN2bEQAA
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": "95ce8344-8fde-405b-b3b6-f16f4e94e1f2",
  "organization_guid": "966ed77a-8f48-4f98-9337-1197e1b7a8ac"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4MCIsImVtYWlsIjoiZW1haWwtMjExQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDV9.S9n4pEwM1Y7Sx8O92ycV_YPJ0QD_5HhQOkOUN2bEQAA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "bf331152-3d55-4b27-abc9-e77363ac48f8",
    "url": "/v2/service_plan_visibilities/bf331152-3d55-4b27-abc9-e77363ac48f8",
    "created_at": "2015-11-03T00:54:05Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "95ce8344-8fde-405b-b3b6-f16f4e94e1f2",
    "organization_guid": "966ed77a-8f48-4f98-9337-1197e1b7a8ac",
    "service_plan_url": "/v2/service_plans/95ce8344-8fde-405b-b3b6-f16f4e94e1f2",
    "organization_url": "/v2/organizations/966ed77a-8f48-4f98-9337-1197e1b7a8ac"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/bf331152-3d55-4b27-abc9-e77363ac48f8
X-VCAP-Request-ID: b7a2ef3b-b941-4822-919e-816415e586f2
Content-Length: 533
X-Content-Type-Options: nosniff