Home
Version 3
Security Groups API

Security Groups API

Associate Space with the Security Group for Staging

PUT /v2/security_groups/:guid/staging_spaces/:space_guid

Request

Route

PUT /v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/staging_spaces/1305ec2b-a31c-4d2e-adc8-d9b764237e96

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/staging_spaces/1305ec2b-a31c-4d2e-adc8-d9b764237e96" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTkiLCJlbWFpbCI6ImVtYWlsLTlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2NjAwODg4MX0.r0oLFGpSuuUWDIpqwuZ6X_8xhkqhspKEOhDYQdRzu9Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "1452e164-0c3e-4a6c-b3c3-c40ad9fd0159",
    "url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159",
    "created_at": "2016-06-08T16:41:21Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces",
    "staging_spaces_url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/staging_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 8cc1cc13-5753-4b7f-b3c3-d893f0d14a50
Content-Length: 419
X-Content-Type-Options: nosniff