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": "f17d344d-e543-4498-b2b4-8b814805d6a6",
  "organization_guid": "c8e59e9a-8f24-407c-b1db-e52c12e5abc5"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NiIsImVtYWlsIjoiZW1haWwtMTA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMDZ9.WwvODeFq8Lm3DFAMklO8Ep30fDfhENVsuKcsLQsNcf4
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": "f17d344d-e543-4498-b2b4-8b814805d6a6",
  "organization_guid": "c8e59e9a-8f24-407c-b1db-e52c12e5abc5"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2NiIsImVtYWlsIjoiZW1haWwtMTA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMDZ9.WwvODeFq8Lm3DFAMklO8Ep30fDfhENVsuKcsLQsNcf4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f46a6df2-bc8b-4dc8-a055-8d695ada031a",
    "url": "/v2/service_plan_visibilities/f46a6df2-bc8b-4dc8-a055-8d695ada031a",
    "created_at": "2015-06-04T00:05:06Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "f17d344d-e543-4498-b2b4-8b814805d6a6",
    "organization_guid": "c8e59e9a-8f24-407c-b1db-e52c12e5abc5",
    "service_plan_url": "/v2/service_plans/f17d344d-e543-4498-b2b4-8b814805d6a6",
    "organization_url": "/v2/organizations/c8e59e9a-8f24-407c-b1db-e52c12e5abc5"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/f46a6df2-bc8b-4dc8-a055-8d695ada031a
X-VCAP-Request-ID: 22f029c5-3d61-4678-a2c1-c9992fd930b5
Content-Length: 533
X-Content-Type-Options: nosniff