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/2382c38b-e862-4bd0-a430-ba0744bb71d5/spaces/c5de1951-d29d-429d-9191-10cd227b64bf

Parameters

Name Description Valid Values Example Values
guid The guid of the Security Group
space_guid The guid of the space

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ3MiIsImVtYWlsIjoiZW1haWwtMzQzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM3MDR9.vUFTitvHH-G1QTcPuKlARrs3y7EsWofu3DL1br9Pl2w
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/2382c38b-e862-4bd0-a430-ba0744bb71d5/spaces/c5de1951-d29d-429d-9191-10cd227b64bf" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ3MiIsImVtYWlsIjoiZW1haWwtMzQzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM3MDR9.vUFTitvHH-G1QTcPuKlARrs3y7EsWofu3DL1br9Pl2w" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2382c38b-e862-4bd0-a430-ba0744bb71d5",
    "url": "/v2/security_groups/2382c38b-e862-4bd0-a430-ba0744bb71d5",
    "created_at": "2015-12-22T18:28:12Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/2382c38b-e862-4bd0-a430-ba0744bb71d5/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 419
X-Content-Type-Options: nosniff