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/94ce525c-5a97-4955-b2b3-2378cf91c947/spaces/062042c3-6546-4a9b-bfac-45f5ccd05686

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/94ce525c-5a97-4955-b2b3-2378cf91c947/spaces/062042c3-6546-4a9b-bfac-45f5ccd05686" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0NSIsImVtYWlsIjoiZW1haWwtMjQ3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2NDF9.txdKq0nS_O6JBH32S8dqzy5bkNf8HgqgxTZYd9XI5nI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "94ce525c-5a97-4955-b2b3-2378cf91c947",
    "url": "/v2/security_groups/94ce525c-5a97-4955-b2b3-2378cf91c947",
    "created_at": "2016-04-16T01:23:45Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/94ce525c-5a97-4955-b2b3-2378cf91c947/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4d886fac-ce21-43a2-a4b2-67f92335430d
Content-Length: 419
X-Content-Type-Options: nosniff