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/320fbe85-4dc6-479d-b8fd-468b23356cee/spaces/e8a9aacb-f8cf-4279-8b4d-59c8e070974d

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NCIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2Mzd9.wVSr-4GR2eFTyZQEPezmB6_R75beMZmUA0U_2xyaaks
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/320fbe85-4dc6-479d-b8fd-468b23356cee/spaces/e8a9aacb-f8cf-4279-8b4d-59c8e070974d" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NCIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2Mzd9.wVSr-4GR2eFTyZQEPezmB6_R75beMZmUA0U_2xyaaks" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "320fbe85-4dc6-479d-b8fd-468b23356cee",
    "url": "/v2/security_groups/320fbe85-4dc6-479d-b8fd-468b23356cee",
    "created_at": "2015-05-07T23:37:05Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/320fbe85-4dc6-479d-b8fd-468b23356cee/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: fb2e47a4-cb7c-4911-b7c5-655565a275d7
Content-Length: 419
X-Content-Type-Options: nosniff