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

Route

PUT /v2/security_groups/6c2b3e58-20d9-4c14-9810-bebd95a7090a/spaces/2e934e5f-b524-4c61-b10d-8eea79686b26

cURL

curl "https://api.[your-domain.com]/v2/security_groups/6c2b3e58-20d9-4c14-9810-bebd95a7090a/spaces/2e934e5f-b524-4c61-b10d-8eea79686b26" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExOCIsImVtYWlsIjoiZW1haWwtODBAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDQ3MTY5MH0.y43hBDbnb0TG8ZKQYpa4bn4edV84WCDxSPfUck6CZS8" \
	-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: 5deec3b0-dc87-4f15-a2e9-bdabcd832344
Content-Length: 419
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "6c2b3e58-20d9-4c14-9810-bebd95a7090a",
    "url": "/v2/security_groups/6c2b3e58-20d9-4c14-9810-bebd95a7090a",
    "created_at": "2015-02-13T22:34:45Z",
    "updated_at": null
  },
  "entity": {
    "name": "dummy1",
    "rules": [

    ],
    "running_default": false,
    "staging_default": false,
    "spaces_url": "/v2/security_groups/6c2b3e58-20d9-4c14-9810-bebd95a7090a/spaces"
  }
}