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": "26002e96-2330-4d0c-b0be-9be25bd675af",
  "organization_guid": "7bec256c-afc7-42c8-b85b-d75f837a0601"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0OSIsImVtYWlsIjoiZW1haWwtMzExQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MzF9.FNreCDSJ0Nyz_VPBjpwTtva1mbDF94e6uVxoL4lkMAk
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": "26002e96-2330-4d0c-b0be-9be25bd675af",
  "organization_guid": "7bec256c-afc7-42c8-b85b-d75f837a0601"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0OSIsImVtYWlsIjoiZW1haWwtMzExQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MzF9.FNreCDSJ0Nyz_VPBjpwTtva1mbDF94e6uVxoL4lkMAk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "435644a7-f6a8-40dd-bf71-5b8c9c59bb9a",
    "url": "/v2/service_plan_visibilities/435644a7-f6a8-40dd-bf71-5b8c9c59bb9a",
    "created_at": "2016-05-12T00:45:31Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "26002e96-2330-4d0c-b0be-9be25bd675af",
    "organization_guid": "7bec256c-afc7-42c8-b85b-d75f837a0601",
    "service_plan_url": "/v2/service_plans/26002e96-2330-4d0c-b0be-9be25bd675af",
    "organization_url": "/v2/organizations/7bec256c-afc7-42c8-b85b-d75f837a0601"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/435644a7-f6a8-40dd-bf71-5b8c9c59bb9a
X-VCAP-Request-ID: 1b06b975-9ef7-4b45-82c2-b5ff7014cd76
Content-Length: 533
X-Content-Type-Options: nosniff