Home
Version 3
Security Groups API

Security Groups API

Associate Space with the Security Group

PUT /v2/security_groups/:guid/spaces/:space_guid

Fields

Name Description Default Valid Values Example Values

Parameters

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1OCIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNDR9.BA3cyNe0SlSO-E97sSXJANOPvK93_EYtx0RafKzop3A
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/security_groups/5e9d4c04-a516-441c-bf41-115d044128cf/spaces/e87f06e0-b8da-4e1b-a177-895cd2f9d993

cURL

curl "https://api.[your-domain.com]/v2/security_groups/5e9d4c04-a516-441c-bf41-115d044128cf/spaces/e87f06e0-b8da-4e1b-a177-895cd2f9d993" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1OCIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNDR9.BA3cyNe0SlSO-E97sSXJANOPvK93_EYtx0RafKzop3A" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 863e8c40-24e7-42b2-9230-cadf076162f3
Content-Length: 424
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "5e9d4c04-a516-441c-bf41-115d044128cf",
    "url": "/v2/security_groups/5e9d4c04-a516-441c-bf41-115d044128cf",
    "created_at": "2014-11-05T01:02:07+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/5e9d4c04-a516-441c-bf41-115d044128cf/spaces"
  }
}