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": "c8ae9b64-0b86-4d4d-a0bb-a4e0b1a0a754",
  "organization_guid": "e7b5de6b-9231-4257-9fb5-4547d92a3e41"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNSIsImVtYWlsIjoiZW1haWwtMjM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjkwMzg3MTZ9.KfgiaRrjCrbDEEOoN1veAeHr1BwTQ77llLkUmt5c7NU
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": "c8ae9b64-0b86-4d4d-a0bb-a4e0b1a0a754",
  "organization_guid": "e7b5de6b-9231-4257-9fb5-4547d92a3e41"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNSIsImVtYWlsIjoiZW1haWwtMjM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjkwMzg3MTZ9.KfgiaRrjCrbDEEOoN1veAeHr1BwTQ77llLkUmt5c7NU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "1c3d0d24-b216-4f7c-a5b2-a50f9c4197ec",
    "url": "/v2/service_plan_visibilities/1c3d0d24-b216-4f7c-a5b2-a50f9c4197ec",
    "created_at": "2015-04-07T19:11:56Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "c8ae9b64-0b86-4d4d-a0bb-a4e0b1a0a754",
    "organization_guid": "e7b5de6b-9231-4257-9fb5-4547d92a3e41",
    "service_plan_url": "/v2/service_plans/c8ae9b64-0b86-4d4d-a0bb-a4e0b1a0a754",
    "organization_url": "/v2/organizations/e7b5de6b-9231-4257-9fb5-4547d92a3e41"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/1c3d0d24-b216-4f7c-a5b2-a50f9c4197ec
X-VCAP-Request-ID: de4b4a81-fdc2-43f3-b850-9304c1ba791e
Content-Length: 533
X-Content-Type-Options: nosniff