Home
Version 3
Service Plan Visibilities API

Service Plan Visibilities API

Creating a Service Plan Visibility

POST /v2/service_plan_visibilities

Fields

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1OCIsImVtYWlsIjoiZW1haWwtMTk4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMzZ9.dk1JiRED5L9JJXtqk7a7_ki2i9YUenNgbWBdL41ZfEo
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/service_plan_visibilities

Body

{
  "service_plan_guid": "e9d38a34-bae1-4043-8581-06fe7e7184ca",
  "organization_guid": "acd86e24-e4e0-45e6-a6d4-f55e85d69713"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plan_visibilities" -d '{
  "service_plan_guid": "e9d38a34-bae1-4043-8581-06fe7e7184ca",
  "organization_guid": "acd86e24-e4e0-45e6-a6d4-f55e85d69713"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1OCIsImVtYWlsIjoiZW1haWwtMTk4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMzZ9.dk1JiRED5L9JJXtqk7a7_ki2i9YUenNgbWBdL41ZfEo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/141fb40e-85f2-41b3-9319-d369e6233d3b
X-VCAP-Request-ID: 0ec0dd7a-4ab0-4137-8404-3129beb61512
Content-Length: 533
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "141fb40e-85f2-41b3-9319-d369e6233d3b",
    "url": "/v2/service_plan_visibilities/141fb40e-85f2-41b3-9319-d369e6233d3b",
    "created_at": "2015-02-12T01:42:16Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "e9d38a34-bae1-4043-8581-06fe7e7184ca",
    "organization_guid": "acd86e24-e4e0-45e6-a6d4-f55e85d69713",
    "service_plan_url": "/v2/service_plans/e9d38a34-bae1-4043-8581-06fe7e7184ca",
    "organization_url": "/v2/organizations/acd86e24-e4e0-45e6-a6d4-f55e85d69713"
  }
}