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/2eedfb13-9119-4624-b698-3724422ffdfd/security_groups/766d0db9-d54a-4424-8ae4-7a664263ff5f

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/security_groups/766d0db9-d54a-4424-8ae4-7a664263ff5f" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNSIsImVtYWlsIjoiZW1haWwtMjMxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMTB9.eeXJpRTqw2CawGgCk5y1cBBMmuB5emu1cuHMnbsr25I" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2eedfb13-9119-4624-b698-3724422ffdfd",
    "url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd",
    "created_at": "2015-08-06T00:36:50Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1974",
    "organization_guid": "b7e31d2e-7f41-4532-a465-242a4dfe3863",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/b7e31d2e-7f41-4532-a465-242a4dfe3863",
    "developers_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/developers",
    "managers_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/managers",
    "auditors_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/auditors",
    "apps_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/apps",
    "routes_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/routes",
    "domains_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/domains",
    "service_instances_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/service_instances",
    "app_events_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/app_events",
    "events_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/events",
    "security_groups_url": "/v2/spaces/2eedfb13-9119-4624-b698-3724422ffdfd/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: a6744bad-45ca-4ee5-855e-aeb7a8971881
Content-Length: 1278
X-Content-Type-Options: nosniff