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/bb301b19-9fad-4522-b94c-2e26832f5681/spaces/ef2e2442-0cef-49b1-831d-bbc039b92b17

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI5NSIsImVtYWlsIjoiZW1haWwtMjEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTR9.f5MhLndsbiM0-jpRyI0WLSElegcS04poFcmzKQYkBCU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/bb301b19-9fad-4522-b94c-2e26832f5681/spaces/ef2e2442-0cef-49b1-831d-bbc039b92b17" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5NSIsImVtYWlsIjoiZW1haWwtMjEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMTR9.f5MhLndsbiM0-jpRyI0WLSElegcS04poFcmzKQYkBCU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "bb301b19-9fad-4522-b94c-2e26832f5681",
    "url": "/v2/security_groups/bb301b19-9fad-4522-b94c-2e26832f5681",
    "created_at": "2015-06-04T00:05:05Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/bb301b19-9fad-4522-b94c-2e26832f5681/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: e10a09dc-a158-492a-97c3-187648c9f1c2
Content-Length: 419
X-Content-Type-Options: nosniff