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.eyJ1c2VyX2lkIjoidWFhLWlkLTEzMCIsImVtYWlsIjoiZW1haWwtODJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQxOTk4OTk2Nn0.Fh-tsrUlBPeMgYPWfWHeEyZjDyVsZn-NXF00eMrMVOE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/security_groups/bb9f52ce-33be-4675-a81c-cb220ef914b2/spaces/cc2509e9-c416-49ce-bc97-467a6bbbf17e

cURL

curl "https://api.[your-domain.com]/v2/security_groups/bb9f52ce-33be-4675-a81c-cb220ef914b2/spaces/cc2509e9-c416-49ce-bc97-467a6bbbf17e" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzMCIsImVtYWlsIjoiZW1haWwtODJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQxOTk4OTk2Nn0.Fh-tsrUlBPeMgYPWfWHeEyZjDyVsZn-NXF00eMrMVOE" \
	-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: fd812670-14f4-488c-a9d4-764832b2eed7
Content-Length: 424
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "bb9f52ce-33be-4675-a81c-cb220ef914b2",
    "url": "/v2/security_groups/bb9f52ce-33be-4675-a81c-cb220ef914b2",
    "created_at": "2014-12-24T01:39:20+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/bb9f52ce-33be-4675-a81c-cb220ef914b2/spaces"
  }
}