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": "6c3b1c4a-cc07-497d-b532-7ffbebe14bfd",
  "organization_guid": "9c1422e1-a3a2-48cf-a0ae-e9f9e8329b22"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk5IiwiZW1haWwiOiJlbWFpbC05OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU2NDUyMjI5fQ.uqisj1Q6G_AL4vhiEfs-csuqimXwYxwvMx7KZF6CW4g
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": "6c3b1c4a-cc07-497d-b532-7ffbebe14bfd",
  "organization_guid": "9c1422e1-a3a2-48cf-a0ae-e9f9e8329b22"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk5IiwiZW1haWwiOiJlbWFpbC05OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU2NDUyMjI5fQ.uqisj1Q6G_AL4vhiEfs-csuqimXwYxwvMx7KZF6CW4g" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "4e50ede7-3d53-4c51-b472-dde81d8d87b4",
    "url": "/v2/service_plan_visibilities/4e50ede7-3d53-4c51-b472-dde81d8d87b4",
    "created_at": "2016-02-19T02:03:49Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "6c3b1c4a-cc07-497d-b532-7ffbebe14bfd",
    "organization_guid": "9c1422e1-a3a2-48cf-a0ae-e9f9e8329b22",
    "service_plan_url": "/v2/service_plans/6c3b1c4a-cc07-497d-b532-7ffbebe14bfd",
    "organization_url": "/v2/organizations/9c1422e1-a3a2-48cf-a0ae-e9f9e8329b22"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/4e50ede7-3d53-4c51-b472-dde81d8d87b4
X-VCAP-Request-ID: 
Content-Length: 533
X-Content-Type-Options: nosniff