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/72264b3d-e1cd-45cc-af73-75a7720a0f6a/spaces/dfedd202-3458-43cc-adef-7dd8101f5526

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.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NCIsImVtYWlsIjoiZW1haWwtMTIzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5ODd9.WvbLjSxg8cNgKSl7zLKHeAOvDqwo56l0-5rkZntJAsY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/security_groups/72264b3d-e1cd-45cc-af73-75a7720a0f6a/spaces/dfedd202-3458-43cc-adef-7dd8101f5526" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NCIsImVtYWlsIjoiZW1haWwtMTIzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5ODd9.WvbLjSxg8cNgKSl7zLKHeAOvDqwo56l0-5rkZntJAsY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "72264b3d-e1cd-45cc-af73-75a7720a0f6a",
    "url": "/v2/security_groups/72264b3d-e1cd-45cc-af73-75a7720a0f6a",
    "created_at": "2015-05-21T01:03:00Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/72264b3d-e1cd-45cc-af73-75a7720a0f6a/spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: db6f9bb1-ccbe-479c-bb83-c81ece6bf9c1
Content-Length: 419
X-Content-Type-Options: nosniff