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": "23e614e1-857f-42a5-a1eb-088cc84dfe27",
  "organization_guid": "a5f19511-5311-4357-931a-2ab36bb86e82"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NyIsImVtYWlsIjoiZW1haWwtMjU2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTl9.ck0m3SkEjx0w0ZQAwe-2jPYDUKU0u4dsgddbpVur580
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": "23e614e1-857f-42a5-a1eb-088cc84dfe27",
  "organization_guid": "a5f19511-5311-4357-931a-2ab36bb86e82"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NyIsImVtYWlsIjoiZW1haWwtMjU2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTl9.ck0m3SkEjx0w0ZQAwe-2jPYDUKU0u4dsgddbpVur580" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "0cf1c1d8-d233-4e53-b468-25d9b618e3d8",
    "url": "/v2/service_plan_visibilities/0cf1c1d8-d233-4e53-b468-25d9b618e3d8",
    "created_at": "2016-04-06T00:17:39Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "23e614e1-857f-42a5-a1eb-088cc84dfe27",
    "organization_guid": "a5f19511-5311-4357-931a-2ab36bb86e82",
    "service_plan_url": "/v2/service_plans/23e614e1-857f-42a5-a1eb-088cc84dfe27",
    "organization_url": "/v2/organizations/a5f19511-5311-4357-931a-2ab36bb86e82"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/0cf1c1d8-d233-4e53-b468-25d9b618e3d8
X-VCAP-Request-ID: 
Content-Length: 533
X-Content-Type-Options: nosniff