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/596f6670-c139-4529-9d6a-d8f790929c6e/spaces/a04c63b2-50d6-4fdd-ba2a-6b2666df894b

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.eyJ1c2VyX2lkIjoidWFhLWlkLTgiLCJlbWFpbCI6ImVtYWlsLThAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNTk0ODY1N30.xqzEit0Dp4ywXxyW6lKaT1z-jcjWJZ5515nlU63QrPY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/596f6670-c139-4529-9d6a-d8f790929c6e/spaces/a04c63b2-50d6-4fdd-ba2a-6b2666df894b" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgiLCJlbWFpbCI6ImVtYWlsLThAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNTk0ODY1N30.xqzEit0Dp4ywXxyW6lKaT1z-jcjWJZ5515nlU63QrPY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "596f6670-c139-4529-9d6a-d8f790929c6e",
    "url": "/v2/security_groups/596f6670-c139-4529-9d6a-d8f790929c6e",
    "created_at": "2015-03-03T00:50:56Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/596f6670-c139-4529-9d6a-d8f790929c6e/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d0b9c696-3f68-4b6c-b66c-f4064fd3497e
Content-Length: 419
X-Content-Type-Options: nosniff