Home
Version 3
Security Groups API

Security Groups API

Associate Space with the Security Group

PUT /v2/security_groups/:guid/spaces/:space_guid

Request

Route

PUT /v2/security_groups/886af93c-7983-47a4-8d18-4b60ac7f85c1/spaces/8fb45d26-a588-40d6-9427-5b8486f74783

Parameters

Name Description Valid Values Example Values
guid The guid of the Security Group
space_guid The guid of the Space

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3NyIsImVtYWlsIjoiZW1haWwtMjA5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NjN9.7biZUjqCdLBDJGFnH2BacT54qqN5dzc7M-qc_-LZ6Iw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/886af93c-7983-47a4-8d18-4b60ac7f85c1/spaces/8fb45d26-a588-40d6-9427-5b8486f74783" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3NyIsImVtYWlsIjoiZW1haWwtMjA5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjc0ODA4NjN9.7biZUjqCdLBDJGFnH2BacT54qqN5dzc7M-qc_-LZ6Iw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "886af93c-7983-47a4-8d18-4b60ac7f85c1",
    "url": "/v2/security_groups/886af93c-7983-47a4-8d18-4b60ac7f85c1",
    "created_at": "2015-03-20T18:27:42Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/886af93c-7983-47a4-8d18-4b60ac7f85c1/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 42f66a08-d2ec-4967-85f5-0cd194a91acb
Content-Length: 419
X-Content-Type-Options: nosniff