Home
Version 3
Security Groups API

Security Groups API

Associate Space with the Security Group

PUT /v2/security_groups/:guid/spaces/:space_guid

Fields

Name Description Default Valid Values Example Values

Parameters

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTciLCJlbWFpbCI6ImVtYWlsLTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDEzNzM2Mn0.d564z7lLZTOc0_IvZkdOVjSbelnt3oD2i7t0-WfCklY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/security_groups/138030d6-5b21-4a72-a3ab-5d9fa6d96224/spaces/a8b82437-8aa7-497b-85da-0d51a72e3050

cURL

curl "https://api.[your-domain.com]/v2/security_groups/138030d6-5b21-4a72-a3ab-5d9fa6d96224/spaces/a8b82437-8aa7-497b-85da-0d51a72e3050" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTciLCJlbWFpbCI6ImVtYWlsLTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDEzNzM2Mn0.d564z7lLZTOc0_IvZkdOVjSbelnt3oD2i7t0-WfCklY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c7c60464-cff6-4fe0-9881-671892a41ad0
Content-Length: 419
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "138030d6-5b21-4a72-a3ab-5d9fa6d96224",
    "url": "/v2/security_groups/138030d6-5b21-4a72-a3ab-5d9fa6d96224",
    "created_at": "2015-02-10T01:42:41Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/138030d6-5b21-4a72-a3ab-5d9fa6d96224/spaces"
  }
}