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/8b5d04f3-798c-45d6-98d1-a79300b02370/spaces/cf6b0b18-21a7-4c14-a678-965dcc4f5267

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.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NyIsImVtYWlsIjoiZW1haWwtMjY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDN9.v-45LRAejieZqXilJ1L_ntfafgQtqJH7_v39AhN-DKQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/8b5d04f3-798c-45d6-98d1-a79300b02370/spaces/cf6b0b18-21a7-4c14-a678-965dcc4f5267" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NyIsImVtYWlsIjoiZW1haWwtMjY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDN9.v-45LRAejieZqXilJ1L_ntfafgQtqJH7_v39AhN-DKQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "8b5d04f3-798c-45d6-98d1-a79300b02370",
    "url": "/v2/security_groups/8b5d04f3-798c-45d6-98d1-a79300b02370",
    "created_at": "2016-02-19T02:03:49Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/8b5d04f3-798c-45d6-98d1-a79300b02370/spaces"
  }
}

Headers

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