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/41cc6e75-33f7-4e65-8574-08b1afffadcd/spaces/2f5eba5a-19b7-4b10-a4a8-288be95d7b13

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/41cc6e75-33f7-4e65-8574-08b1afffadcd/spaces/2f5eba5a-19b7-4b10-a4a8-288be95d7b13" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5MCIsImVtYWlsIjoiZW1haWwtMjU4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NTV9.espBgY9Gp8Ekd55J70dT5wMLxAS6G3i5q66dSRu1gHQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "41cc6e75-33f7-4e65-8574-08b1afffadcd",
    "url": "/v2/security_groups/41cc6e75-33f7-4e65-8574-08b1afffadcd",
    "created_at": "2015-09-30T23:30:49Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/41cc6e75-33f7-4e65-8574-08b1afffadcd/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: bd4e51fd-5b98-4309-a5c4-192e92631bea
Content-Length: 419
X-Content-Type-Options: nosniff