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/ebbf839d-b248-4e72-95a2-e95988bfc466/spaces/7858b9d9-045f-40d6-80d1-d6ae9e419e06

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/ebbf839d-b248-4e72-95a2-e95988bfc466/spaces/7858b9d9-045f-40d6-80d1-d6ae9e419e06" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzIiwiZW1haWwiOiJlbWFpbC0xMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2NjMzODk0fQ.Tgh84dPKflM4nRY4Gcd24iYrN9zqoXXqdQGToKJj4rI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "ebbf839d-b248-4e72-95a2-e95988bfc466",
    "url": "/v2/security_groups/ebbf839d-b248-4e72-95a2-e95988bfc466",
    "created_at": "2015-03-10T23:11:30Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/ebbf839d-b248-4e72-95a2-e95988bfc466/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 5b3c409c-9e3b-4ae6-8c20-2fcaa73ff46a
Content-Length: 419
X-Content-Type-Options: nosniff