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/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/security_groups/e961b35b-a4eb-484b-8e3f-b79cab6b399f

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/security_groups/e961b35b-a4eb-484b-8e3f-b79cab6b399f" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MiIsImVtYWlsIjoiZW1haWwtMTU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MTd9.XEtvvutlz9bzKHh-w8yL6P8c1Esj7_EhiI4Ma7ALa_I" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5",
    "url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5",
    "created_at": "2016-05-12T00:45:17Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1587",
    "organization_guid": "03385a7d-67fc-47de-a145-06c630083d61",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/03385a7d-67fc-47de-a145-06c630083d61",
    "developers_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/developers",
    "managers_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/managers",
    "auditors_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/auditors",
    "apps_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/apps",
    "routes_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/routes",
    "domains_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/domains",
    "service_instances_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/service_instances",
    "app_events_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/app_events",
    "events_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/events",
    "security_groups_url": "/v2/spaces/7a0d5dc6-b2a3-4ee9-9a10-a4d2b978f9c5/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 5c8b091e-0204-4042-96da-ac4196658607
Content-Length: 1278
X-Content-Type-Options: nosniff