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": "db90c865-9f68-47f2-9d45-4a59343aec0a",
  "organization_guid": "79059c35-b445-44b1-997c-c2ca1885d5da"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MCIsImVtYWlsIjoiZW1haWwtODZAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTU1NzkzOH0.kY-16MYExoXDCwd6xOVBDP3rILSlrOAS7iaZcGOmEDg
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": "db90c865-9f68-47f2-9d45-4a59343aec0a",
  "organization_guid": "79059c35-b445-44b1-997c-c2ca1885d5da"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MCIsImVtYWlsIjoiZW1haWwtODZAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTU1NzkzOH0.kY-16MYExoXDCwd6xOVBDP3rILSlrOAS7iaZcGOmEDg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b33b9160-18f7-424d-8918-da1c65f06f98",
    "url": "/v2/service_plan_visibilities/b33b9160-18f7-424d-8918-da1c65f06f98",
    "created_at": "2015-10-15T23:52:18Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "db90c865-9f68-47f2-9d45-4a59343aec0a",
    "organization_guid": "79059c35-b445-44b1-997c-c2ca1885d5da",
    "service_plan_url": "/v2/service_plans/db90c865-9f68-47f2-9d45-4a59343aec0a",
    "organization_url": "/v2/organizations/79059c35-b445-44b1-997c-c2ca1885d5da"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/b33b9160-18f7-424d-8918-da1c65f06f98
X-VCAP-Request-ID: e4ae09c9-183e-40ad-873c-e5f23d5efdf1
Content-Length: 533
X-Content-Type-Options: nosniff