Home
Version 3
Spaces API

Spaces API

Associate Security Group with the Space

PUT /v2/spaces/:guid/security_groups/:security_group_guid

Request

Route

PUT /v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/security_groups/5bcd9b44-86d0-412b-99d0-52726418c84d

Parameters

Name Description Valid Values Example Values
guid The guid of the Space

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MSIsImVtYWlsIjoiZW1haWwtMTE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMDd9.hg06_zSTHATMbe0Va40Y7cGBsjaCL7SgC7EHUvcxohg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/security_groups/5bcd9b44-86d0-412b-99d0-52726418c84d" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MSIsImVtYWlsIjoiZW1haWwtMTE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMDd9.hg06_zSTHATMbe0Va40Y7cGBsjaCL7SgC7EHUvcxohg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2ad758c5-71dc-4eb5-b7ab-a712ae19fb52",
    "url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52",
    "created_at": "2015-06-04T00:05:07Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1374",
    "organization_guid": "9a4a44fd-ebc5-46ff-a26e-edb242dc80ec",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/9a4a44fd-ebc5-46ff-a26e-edb242dc80ec",
    "developers_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/developers",
    "managers_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/managers",
    "auditors_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/auditors",
    "apps_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/apps",
    "routes_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/routes",
    "domains_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/domains",
    "service_instances_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/service_instances",
    "app_events_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/app_events",
    "events_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/events",
    "security_groups_url": "/v2/spaces/2ad758c5-71dc-4eb5-b7ab-a712ae19fb52/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f2715055-70a2-478b-93da-cb0fd0b8dd6d
Content-Length: 1278
X-Content-Type-Options: nosniff