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/260ba675-47b6-4094-be7a-349d58e3d36a/spaces/e9d9cce0-2789-4f5e-bbcc-94c0fc1dc0e9

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.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNSIsImVtYWlsIjoiZW1haWwtMjY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MjZ9.dtN10etTbI17enB1AqxFxkKCDol2-d8MnNJ0Yki2ZyQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/260ba675-47b6-4094-be7a-349d58e3d36a/spaces/e9d9cce0-2789-4f5e-bbcc-94c0fc1dc0e9" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNSIsImVtYWlsIjoiZW1haWwtMjY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MjZ9.dtN10etTbI17enB1AqxFxkKCDol2-d8MnNJ0Yki2ZyQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "260ba675-47b6-4094-be7a-349d58e3d36a",
    "url": "/v2/security_groups/260ba675-47b6-4094-be7a-349d58e3d36a",
    "created_at": "2016-05-12T00:45:10Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/260ba675-47b6-4094-be7a-349d58e3d36a/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 821db5d1-c407-4b71-8065-3d9e8b2c6b63
Content-Length: 419
X-Content-Type-Options: nosniff