Home
Version 3
Spaces API

Spaces API

Associate Security Group with the Space

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

Request

Route

PUT /v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/security_groups/6d17abfc-5014-426a-a993-8abc57762708

Parameters

Name Description Valid Values Example Values
guid The guid of the Space
security_group_guid The guid of the security group

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyNyIsImVtYWlsIjoiZW1haWwtMTY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTB9.523IRWh_fE0EYI2wJqMK7umpugPaW2dwFJGoUoJScX8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/security_groups/6d17abfc-5014-426a-a993-8abc57762708" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyNyIsImVtYWlsIjoiZW1haWwtMTY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTB9.523IRWh_fE0EYI2wJqMK7umpugPaW2dwFJGoUoJScX8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "4c8e99ea-9400-4179-8735-ae293608fc54",
    "url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54",
    "created_at": "2016-04-06T00:17:30Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-911",
    "organization_guid": "922e136f-1cd5-4b38-b55b-4110c2bbf638",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/922e136f-1cd5-4b38-b55b-4110c2bbf638",
    "developers_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/developers",
    "managers_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/managers",
    "auditors_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/auditors",
    "apps_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/apps",
    "routes_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/routes",
    "domains_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/domains",
    "service_instances_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/service_instances",
    "app_events_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/app_events",
    "events_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/events",
    "security_groups_url": "/v2/spaces/4c8e99ea-9400-4179-8735-ae293608fc54/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1277
X-Content-Type-Options: nosniff