Home
Version 3
Spaces API

Spaces API

Associate Security Group with the Space

PUT /v2/spaces/:guid/security_groups/:security_group_guid

Fields

Name Description Default Valid Values Example Values

Parameters

Name Description Valid Values Example Values
guid The guid of the Space

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NCIsImVtYWlsIjoiZW1haWwtMTc5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MDd9.UauhOd3cYsDYLj-tb6bPlhArNWzHCC0gHoNyjDbZXa4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/security_groups/30f54385-1738-44fa-83c9-670907a6410e

cURL

curl "https://api.[your-domain.com]/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/security_groups/30f54385-1738-44fa-83c9-670907a6410e" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NCIsImVtYWlsIjoiZW1haWwtMTc5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTY1MjY3MDd9.UauhOd3cYsDYLj-tb6bPlhArNWzHCC0gHoNyjDbZXa4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f5eb5416-6ae7-4b8c-9671-00bf512313c6
Content-Length: 1259
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f",
    "url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f",
    "created_at": "2014-11-13T23:38:27+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "name-840",
    "organization_guid": "e70178a4-27f9-4e1f-9aa5-9751e99b6f04",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/e70178a4-27f9-4e1f-9aa5-9751e99b6f04",
    "developers_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/developers",
    "managers_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/managers",
    "auditors_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/auditors",
    "apps_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/apps",
    "routes_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/routes",
    "domains_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/domains",
    "service_instances_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/service_instances",
    "app_events_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/app_events",
    "events_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/events",
    "security_groups_url": "/v2/spaces/57e1f4c8-4c43-4e1d-80e2-16eb1c35f42f/security_groups"
  }
}