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/96d02141-a2b8-426e-8476-4edaff81bd7a/security_groups/39f875f8-96b2-4008-8446-4a9f8f4f06ec

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/security_groups/39f875f8-96b2-4008-8446-4a9f8f4f06ec" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOCIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDN9.kFFEZXevpoty4oSDTLc_OtkjQ7KyeLs96eNFiEgYNQU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "96d02141-a2b8-426e-8476-4edaff81bd7a",
    "url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a",
    "created_at": "2015-11-03T00:54:03Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1069",
    "organization_guid": "f24f13df-d7b2-48aa-a93d-22a8200a2c6c",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/f24f13df-d7b2-48aa-a93d-22a8200a2c6c",
    "developers_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/developers",
    "managers_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/managers",
    "auditors_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/auditors",
    "apps_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/apps",
    "routes_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/routes",
    "domains_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/domains",
    "service_instances_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/service_instances",
    "app_events_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/app_events",
    "events_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/events",
    "security_groups_url": "/v2/spaces/96d02141-a2b8-426e-8476-4edaff81bd7a/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d9783e28-96f8-460a-92b1-b419ef120265
Content-Length: 1278
X-Content-Type-Options: nosniff