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": "572304e3-7dce-4a0f-a9fb-b1c8155885a2",
  "organization_guid": "15a8dd98-d731-4850-bd9e-0022c76951ba"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNSIsImVtYWlsIjoiZW1haWwtNzRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTk1ODM5NH0.GT0frcKyPo33xkos1hibnTazXB7yBu43UhVxyNAxsoo
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": "572304e3-7dce-4a0f-a9fb-b1c8155885a2",
  "organization_guid": "15a8dd98-d731-4850-bd9e-0022c76951ba"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNSIsImVtYWlsIjoiZW1haWwtNzRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTk1ODM5NH0.GT0frcKyPo33xkos1hibnTazXB7yBu43UhVxyNAxsoo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "59cf857c-d23f-49b6-a184-6e710e334690",
    "url": "/v2/service_plan_visibilities/59cf857c-d23f-49b6-a184-6e710e334690",
    "created_at": "2016-04-22T19:33:14Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "572304e3-7dce-4a0f-a9fb-b1c8155885a2",
    "organization_guid": "15a8dd98-d731-4850-bd9e-0022c76951ba",
    "service_plan_url": "/v2/service_plans/572304e3-7dce-4a0f-a9fb-b1c8155885a2",
    "organization_url": "/v2/organizations/15a8dd98-d731-4850-bd9e-0022c76951ba"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/59cf857c-d23f-49b6-a184-6e710e334690
X-VCAP-Request-ID: 63a30286-73d8-47c0-8aa8-e4a0d0747f64
Content-Length: 533
X-Content-Type-Options: nosniff