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/b1af6d7e-0bd6-4c85-bfee-04e414947d7e/spaces/13a918af-d57d-44df-a320-1577ef7641e8

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/b1af6d7e-0bd6-4c85-bfee-04e414947d7e/spaces/13a918af-d57d-44df-a320-1577ef7641e8" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEiLCJlbWFpbCI6ImVtYWlsLTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MDUwNjYzNH0.AzRYCrztST7bkr0ELNswiDUVPIq91jxJuTkR2DnaLuA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b1af6d7e-0bd6-4c85-bfee-04e414947d7e",
    "url": "/v2/security_groups/b1af6d7e-0bd6-4c85-bfee-04e414947d7e",
    "created_at": "2016-04-06T00:17:14Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/b1af6d7e-0bd6-4c85-bfee-04e414947d7e/spaces"
  }
}

Headers

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