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": "4cfbf8dc-3983-4a0b-957c-82c8688c066e",
  "organization_guid": "4b9f8b0d-0dce-4a69-8daa-55c7f789d8fb"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNSIsImVtYWlsIjoiZW1haWwtMTMzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3ODd9.21tu64W6X9YJHl2MWMZbWt8DRxwBdDTPUZBnq8YKiFQ
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": "4cfbf8dc-3983-4a0b-957c-82c8688c066e",
  "organization_guid": "4b9f8b0d-0dce-4a69-8daa-55c7f789d8fb"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNSIsImVtYWlsIjoiZW1haWwtMTMzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3ODd9.21tu64W6X9YJHl2MWMZbWt8DRxwBdDTPUZBnq8YKiFQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "a83179d2-9122-43b0-b259-1f8414a83d53",
    "url": "/v2/service_plan_visibilities/a83179d2-9122-43b0-b259-1f8414a83d53",
    "created_at": "2015-07-06T23:23:07Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "4cfbf8dc-3983-4a0b-957c-82c8688c066e",
    "organization_guid": "4b9f8b0d-0dce-4a69-8daa-55c7f789d8fb",
    "service_plan_url": "/v2/service_plans/4cfbf8dc-3983-4a0b-957c-82c8688c066e",
    "organization_url": "/v2/organizations/4b9f8b0d-0dce-4a69-8daa-55c7f789d8fb"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/a83179d2-9122-43b0-b259-1f8414a83d53
X-VCAP-Request-ID: 5e67f503-46a9-477b-a3d6-b1bdd5f74c50
Content-Length: 533
X-Content-Type-Options: nosniff