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/bb48a331-5fd6-4979-844d-bdacfc9cf719/spaces/39749252-9efa-44d2-93b1-a53ab7cc1be1

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNyIsImVtYWlsIjoiZW1haWwtMzA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NTN9.qCe3DWomdGXaIZhOpTMkukyXOzbUara2zTTtZWKYDhw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/bb48a331-5fd6-4979-844d-bdacfc9cf719/spaces/39749252-9efa-44d2-93b1-a53ab7cc1be1" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNyIsImVtYWlsIjoiZW1haWwtMzA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NTN9.qCe3DWomdGXaIZhOpTMkukyXOzbUara2zTTtZWKYDhw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "bb48a331-5fd6-4979-844d-bdacfc9cf719",
    "url": "/v2/security_groups/bb48a331-5fd6-4979-844d-bdacfc9cf719",
    "created_at": "2016-03-14T22:30:52Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/bb48a331-5fd6-4979-844d-bdacfc9cf719/spaces"
  }
}

Headers

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