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/94e91c57-bac9-4a3b-8d77-2d0b94238f5c/spaces/1dac1ae2-146a-451b-bb1b-c016125c507b

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

cURL

curl "https://api.[your-domain.com]/v2/security_groups/94e91c57-bac9-4a3b-8d77-2d0b94238f5c/spaces/1dac1ae2-146a-451b-bb1b-c016125c507b" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3OCIsImVtYWlsIjoiZW1haWwtMjY4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTZ9.b0goYGwt0d-B6br3wG13g09k30ydJnFXPl3mLWbyRXk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "94e91c57-bac9-4a3b-8d77-2d0b94238f5c",
    "url": "/v2/security_groups/94e91c57-bac9-4a3b-8d77-2d0b94238f5c",
    "created_at": "2015-08-31T21:50:09Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/94e91c57-bac9-4a3b-8d77-2d0b94238f5c/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 85b8990d-5e73-4f6e-bcb0-364f932c3dbb
Content-Length: 419
X-Content-Type-Options: nosniff