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

Route

PUT /v2/security_groups/3a35e0ac-8f4b-4988-8355-9a2eb4566dd7/spaces/b2444904-7378-48dd-a83c-c9f1bdcadb8e

cURL

curl "https://api.[your-domain.com]/v2/security_groups/3a35e0ac-8f4b-4988-8355-9a2eb4566dd7/spaces/b2444904-7378-48dd-a83c-c9f1bdcadb8e" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTcxIiwiZW1haWwiOiJlbWFpbC02NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2Njk5fQ.MiMBPFHD3mDIKBbWFyikCHf_dFBgpOJP5pMMUGfp-Nc" \
	-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: 8b1fbb11-98c5-4d94-8c75-35fcf86a7eed
Content-Length: 424
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "3a35e0ac-8f4b-4988-8355-9a2eb4566dd7",
    "url": "/v2/security_groups/3a35e0ac-8f4b-4988-8355-9a2eb4566dd7",
    "created_at": "2014-11-13T23:38:13+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/3a35e0ac-8f4b-4988-8355-9a2eb4566dd7/spaces"
  }
}