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

Route

PUT /v2/security_groups/32b8532a-ec24-434a-9ea9-3e5a6db66327/spaces/a6b9464b-933e-4988-8190-2fd85776fb09

cURL

curl "https://api.[your-domain.com]/v2/security_groups/32b8532a-ec24-434a-9ea9-3e5a6db66327/spaces/a6b9464b-933e-4988-8190-2fd85776fb09" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwOSIsImVtYWlsIjoiZW1haWwtMTUwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzR9.manOV0Ai2w8Add7XMxCrFugM-mhw_4wNRl39dWgaLBM" \
	-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: a8544db5-146f-4100-ae08-8899149f8f48
Content-Length: 419
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "32b8532a-ec24-434a-9ea9-3e5a6db66327",
    "url": "/v2/security_groups/32b8532a-ec24-434a-9ea9-3e5a6db66327",
    "created_at": "2015-01-27T19:14:28Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/32b8532a-ec24-434a-9ea9-3e5a6db66327/spaces"
  }
}