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": "406fd894-207e-42c6-8ba0-c288a1675fe4",
  "organization_guid": "cf95e65a-26d3-425b-af94-954126af8de4"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OCIsImVtYWlsIjoiZW1haWwtMjkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NzB9.EJKq20hNGFfhtJ1Gj54D7BJFtNM5w2-uA50BcdqZlhU
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": "406fd894-207e-42c6-8ba0-c288a1675fe4",
  "organization_guid": "cf95e65a-26d3-425b-af94-954126af8de4"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OCIsImVtYWlsIjoiZW1haWwtMjkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NzB9.EJKq20hNGFfhtJ1Gj54D7BJFtNM5w2-uA50BcdqZlhU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "20dcb890-dbe6-4094-94b0-c478af8ae414",
    "url": "/v2/service_plan_visibilities/20dcb890-dbe6-4094-94b0-c478af8ae414",
    "created_at": "2015-03-20T18:27:50Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "406fd894-207e-42c6-8ba0-c288a1675fe4",
    "organization_guid": "cf95e65a-26d3-425b-af94-954126af8de4",
    "service_plan_url": "/v2/service_plans/406fd894-207e-42c6-8ba0-c288a1675fe4",
    "organization_url": "/v2/organizations/cf95e65a-26d3-425b-af94-954126af8de4"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/20dcb890-dbe6-4094-94b0-c478af8ae414
X-VCAP-Request-ID: 52e6c6b7-923c-4aa0-a182-4570f8b27526
Content-Length: 533
X-Content-Type-Options: nosniff