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/22677b6c-47a3-48a1-96e7-6dd74467ea94/spaces/1a2ac8cc-d164-4658-88d3-8e36a593d13d

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/22677b6c-47a3-48a1-96e7-6dd74467ea94/spaces/1a2ac8cc-d164-4658-88d3-8e36a593d13d" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5NCIsImVtYWlsIjoiZW1haWwtMjk0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNTN9.cnJOKn7FPkUlAtiMPaea6j0u6Q436H9nn6rAHZgtPJI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "22677b6c-47a3-48a1-96e7-6dd74467ea94",
    "url": "/v2/security_groups/22677b6c-47a3-48a1-96e7-6dd74467ea94",
    "created_at": "2015-04-15T00:55:46Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/22677b6c-47a3-48a1-96e7-6dd74467ea94/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3ec4a624-3141-4841-993d-9f16a370290f
Content-Length: 419
X-Content-Type-Options: nosniff