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/fc70a601-c15a-4c20-925e-aa9a2c37a216/spaces/b5f21e5d-d0c6-4cc4-9822-c30649d304ec

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/fc70a601-c15a-4c20-925e-aa9a2c37a216/spaces/b5f21e5d-d0c6-4cc4-9822-c30649d304ec" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4MSIsImVtYWlsIjoiZW1haWwtMjcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE4MTN9.SQqSV48M2pifOM22x6Z60mASa6GjiSv7h0BwmYLrqho" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "fc70a601-c15a-4c20-925e-aa9a2c37a216",
    "url": "/v2/security_groups/fc70a601-c15a-4c20-925e-aa9a2c37a216",
    "created_at": "2015-07-27T22:43:31Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/fc70a601-c15a-4c20-925e-aa9a2c37a216/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 69f681f9-c339-443f-83ca-0a52976f19c8
Content-Length: 419
X-Content-Type-Options: nosniff