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/dbc8b22c-6beb-4e3f-aa02-760b3943746f/spaces/bac287b4-baa3-4aef-9912-4151ac739b6a

Parameters

Name Description Valid Values Example Values
guid The guid of the Security Group
space_guid The guid of the space
space_guid The guid of the Space

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3MSIsImVtYWlsIjoiZW1haWwtMTg4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTF9._2mJWKXCPquK2QNJKJiuujhvR0mLjPC09uQdFT1oOUs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/dbc8b22c-6beb-4e3f-aa02-760b3943746f/spaces/bac287b4-baa3-4aef-9912-4151ac739b6a" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3MSIsImVtYWlsIjoiZW1haWwtMTg4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTF9._2mJWKXCPquK2QNJKJiuujhvR0mLjPC09uQdFT1oOUs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "dbc8b22c-6beb-4e3f-aa02-760b3943746f",
    "url": "/v2/security_groups/dbc8b22c-6beb-4e3f-aa02-760b3943746f",
    "created_at": "2015-07-06T23:23:06Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/dbc8b22c-6beb-4e3f-aa02-760b3943746f/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c4cc5b64-bf44-493c-8a42-b3f3300dc731
Content-Length: 419
X-Content-Type-Options: nosniff