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/875fa37e-4512-4e3b-ac35-1c842c925069/spaces/5ebf36f3-0634-468b-8571-c0ca34983aca

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/875fa37e-4512-4e3b-ac35-1c842c925069/spaces/5ebf36f3-0634-468b-8571-c0ca34983aca" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxNSIsImVtYWlsIjoiZW1haWwtMjg0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2ODh9.AG4oMwgLNbv5smJOwbddWgPX8p5zMnFey7cbStoD6Is" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "875fa37e-4512-4e3b-ac35-1c842c925069",
    "url": "/v2/security_groups/875fa37e-4512-4e3b-ac35-1c842c925069",
    "created_at": "2016-03-17T21:41:20Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/875fa37e-4512-4e3b-ac35-1c842c925069/spaces"
  }
}

Headers

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