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": "da2f5af3-6a9b-4b10-b740-40a6c400b893",
  "organization_guid": "1b0fab0c-c365-4a81-93ce-3c968676348a"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2MCIsImVtYWlsIjoiZW1haWwtMTA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDN9.UpaCfBf3D30r24mPZfX0faZf-uOs8SzWE4Dqfud0ToY
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": "da2f5af3-6a9b-4b10-b740-40a6c400b893",
  "organization_guid": "1b0fab0c-c365-4a81-93ce-3c968676348a"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2MCIsImVtYWlsIjoiZW1haWwtMTA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDN9.UpaCfBf3D30r24mPZfX0faZf-uOs8SzWE4Dqfud0ToY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "0f3419c2-3a17-44cd-a29f-e96af4120890",
    "url": "/v2/service_plan_visibilities/0f3419c2-3a17-44cd-a29f-e96af4120890",
    "created_at": "2015-08-31T21:50:02Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "da2f5af3-6a9b-4b10-b740-40a6c400b893",
    "organization_guid": "1b0fab0c-c365-4a81-93ce-3c968676348a",
    "service_plan_url": "/v2/service_plans/da2f5af3-6a9b-4b10-b740-40a6c400b893",
    "organization_url": "/v2/organizations/1b0fab0c-c365-4a81-93ce-3c968676348a"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/0f3419c2-3a17-44cd-a29f-e96af4120890
X-VCAP-Request-ID: 381c9ba3-fdf6-4578-8d7c-8429dad34252
Content-Length: 533
X-Content-Type-Options: nosniff