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.eyJ1c2VyX2lkIjoidWFhLWlkLTE4OSIsImVtYWlsIjoiZW1haWwtMTYyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjN9.4k-ZmEPA-gPACJ39sg0m3uUovKAXqVWtRxWP_ok7JRA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/security_groups/28d6f4c6-d9b9-4b12-b2b4-0c2cbb391f95/spaces/6af584d8-3157-4304-827b-b3359868e7c8

cURL

curl "https://api.[your-domain.com]/v2/security_groups/28d6f4c6-d9b9-4b12-b2b4-0c2cbb391f95/spaces/6af584d8-3157-4304-827b-b3359868e7c8" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4OSIsImVtYWlsIjoiZW1haWwtMTYyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNjN9.4k-ZmEPA-gPACJ39sg0m3uUovKAXqVWtRxWP_ok7JRA" \
	-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: 09c0a444-ae73-4f5b-b479-9733c0528c87
Content-Length: 424
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "28d6f4c6-d9b9-4b12-b2b4-0c2cbb391f95",
    "url": "/v2/security_groups/28d6f4c6-d9b9-4b12-b2b4-0c2cbb391f95",
    "created_at": "2014-11-24T19:32:34+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/28d6f4c6-d9b9-4b12-b2b4-0c2cbb391f95/spaces"
  }
}