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/701d7401-cb24-4fd3-a5fc-ee6b659b576b/spaces/d8f40d13-6c83-4037-879b-8fea0dcd2f9f

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/701d7401-cb24-4fd3-a5fc-ee6b659b576b/spaces/d8f40d13-6c83-4037-879b-8fea0dcd2f9f" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5OSIsImVtYWlsIjoiZW1haWwtMTUxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NDd9.HIA3LV6PqUtxHmcOXDiA4umgGrL2PHQG4PFQ7MxVclI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "701d7401-cb24-4fd3-a5fc-ee6b659b576b",
    "url": "/v2/security_groups/701d7401-cb24-4fd3-a5fc-ee6b659b576b",
    "created_at": "2015-03-05T19:15:45Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/701d7401-cb24-4fd3-a5fc-ee6b659b576b/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f843a05d-9a1c-4772-af09-47a8ab9861e7
Content-Length: 419
X-Content-Type-Options: nosniff