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/ff8c3899-4f16-434a-a245-0566be958d9b/security_groups/d1abdf59-7632-42ce-9e4c-061469056ad1

Parameters

Name Description Valid Values Example Values
guid The guid of the Space
security_group_guid The guid of the security group

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/security_groups/d1abdf59-7632-42ce-9e4c-061469056ad1" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyNyIsImVtYWlsIjoiZW1haWwtMTU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDZ9.uTnHeASpAIOVk6DAIH_gZK15gQz7YiG9E1_g_SDzCco" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "ff8c3899-4f16-434a-a245-0566be958d9b",
    "url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b",
    "created_at": "2015-08-31T21:50:06Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-830",
    "organization_guid": "7302b06e-7f38-404a-9383-37ccf6562b32",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/7302b06e-7f38-404a-9383-37ccf6562b32",
    "developers_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/developers",
    "managers_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/managers",
    "auditors_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/auditors",
    "apps_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/apps",
    "routes_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/routes",
    "domains_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/domains",
    "service_instances_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/service_instances",
    "app_events_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/app_events",
    "events_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/events",
    "security_groups_url": "/v2/spaces/ff8c3899-4f16-434a-a245-0566be958d9b/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 084250a7-1ed6-4b27-9dc3-71daa526b9d8
Content-Length: 1277
X-Content-Type-Options: nosniff