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/12e71bee-8376-43ff-8d29-45e930ad23d8/spaces/d59b3c68-6bb1-41f2-8b6b-1b9c2e56938e

Parameters

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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1OSIsImVtYWlsIjoiZW1haWwtMTY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMDV9.hvIrlWScXMyB9kJZFkL6UJoWna1zL82_zeK3Awqd1bI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/12e71bee-8376-43ff-8d29-45e930ad23d8/spaces/d59b3c68-6bb1-41f2-8b6b-1b9c2e56938e" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1OSIsImVtYWlsIjoiZW1haWwtMTY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMDV9.hvIrlWScXMyB9kJZFkL6UJoWna1zL82_zeK3Awqd1bI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "12e71bee-8376-43ff-8d29-45e930ad23d8",
    "url": "/v2/security_groups/12e71bee-8376-43ff-8d29-45e930ad23d8",
    "created_at": "2015-08-06T00:36:45Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/12e71bee-8376-43ff-8d29-45e930ad23d8/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3724946a-9ef3-4fbc-bb82-367ef6e661b3
Content-Length: 419
X-Content-Type-Options: nosniff