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": "e01fd938-883c-415f-b59b-024063960ce7",
  "organization_guid": "e95efd8f-0ee7-4efe-ba3e-bccce237f043"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1NyIsImVtYWlsIjoiZW1haWwtMzI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NjR9.dVYQ7mdwzTT1QkD3iB_wsVSy_ywgOxLcblMBEfbyk84
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": "e01fd938-883c-415f-b59b-024063960ce7",
  "organization_guid": "e95efd8f-0ee7-4efe-ba3e-bccce237f043"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1NyIsImVtYWlsIjoiZW1haWwtMzI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NjR9.dVYQ7mdwzTT1QkD3iB_wsVSy_ywgOxLcblMBEfbyk84" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c106b8ab-d6fe-4653-aac0-4b89a2d07c35",
    "url": "/v2/service_plan_visibilities/c106b8ab-d6fe-4653-aac0-4b89a2d07c35",
    "created_at": "2015-09-30T23:31:04Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "e01fd938-883c-415f-b59b-024063960ce7",
    "organization_guid": "e95efd8f-0ee7-4efe-ba3e-bccce237f043",
    "service_plan_url": "/v2/service_plans/e01fd938-883c-415f-b59b-024063960ce7",
    "organization_url": "/v2/organizations/e95efd8f-0ee7-4efe-ba3e-bccce237f043"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/c106b8ab-d6fe-4653-aac0-4b89a2d07c35
X-VCAP-Request-ID: 827ed659-ff73-4a60-a166-09d7c6f3e3d9
Content-Length: 533
X-Content-Type-Options: nosniff