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": "43f5496b-9117-404a-a637-eb38141b05af",
  "organization_guid": "09be17a1-0cc6-4edb-955c-cf2a2ae85470"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNSIsImVtYWlsIjoiZW1haWwtMjI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE4MDh9.wMcahWBjjTzspow0nrURNOZ6QDleczru4zBnRibGW54
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": "43f5496b-9117-404a-a637-eb38141b05af",
  "organization_guid": "09be17a1-0cc6-4edb-955c-cf2a2ae85470"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNSIsImVtYWlsIjoiZW1haWwtMjI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE4MDh9.wMcahWBjjTzspow0nrURNOZ6QDleczru4zBnRibGW54" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "28a22749-25f4-44bd-a371-c37e2ee53175",
    "url": "/v2/service_plan_visibilities/28a22749-25f4-44bd-a371-c37e2ee53175",
    "created_at": "2015-07-27T22:43:28Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "43f5496b-9117-404a-a637-eb38141b05af",
    "organization_guid": "09be17a1-0cc6-4edb-955c-cf2a2ae85470",
    "service_plan_url": "/v2/service_plans/43f5496b-9117-404a-a637-eb38141b05af",
    "organization_url": "/v2/organizations/09be17a1-0cc6-4edb-955c-cf2a2ae85470"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/28a22749-25f4-44bd-a371-c37e2ee53175
X-VCAP-Request-ID: 35f5bd7b-8896-4c1b-9bde-2f23289d2b47
Content-Length: 533
X-Content-Type-Options: nosniff