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": "25c69312-b404-4976-b901-bba4141e7f0d",
  "organization_guid": "5722c85f-f440-42f8-a8b0-18870eeac1de"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNiIsImVtYWlsIjoiZW1haWwtMjc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTMzMTA5OTF9.bdvqNaxOurfCKZvFe79adJIMcaBeX8mqI8Wbsc9bQAk
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": "25c69312-b404-4976-b901-bba4141e7f0d",
  "organization_guid": "5722c85f-f440-42f8-a8b0-18870eeac1de"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNiIsImVtYWlsIjoiZW1haWwtMjc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTMzMTA5OTF9.bdvqNaxOurfCKZvFe79adJIMcaBeX8mqI8Wbsc9bQAk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "df19402e-8352-4985-a4f9-b46a4e359a4c",
    "url": "/v2/service_plan_visibilities/df19402e-8352-4985-a4f9-b46a4e359a4c",
    "created_at": "2016-01-13T17:29:51Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "25c69312-b404-4976-b901-bba4141e7f0d",
    "organization_guid": "5722c85f-f440-42f8-a8b0-18870eeac1de",
    "service_plan_url": "/v2/service_plans/25c69312-b404-4976-b901-bba4141e7f0d",
    "organization_url": "/v2/organizations/5722c85f-f440-42f8-a8b0-18870eeac1de"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/df19402e-8352-4985-a4f9-b46a4e359a4c
X-VCAP-Request-ID: 
Content-Length: 533
X-Content-Type-Options: nosniff