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/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/security_groups/984234d0-a31d-4409-88e4-da5d1189a32d

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.eyJ1c2VyX2lkIjoidWFhLWlkLTM5MiIsImVtYWlsIjoiZW1haWwtMjgyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDR9.Co-cG69dDMLbiRDTYqLnHWaCW0g39-BxfLCQd5pf4NU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/security_groups/984234d0-a31d-4409-88e4-da5d1189a32d" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5MiIsImVtYWlsIjoiZW1haWwtMjgyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyNDR9.Co-cG69dDMLbiRDTYqLnHWaCW0g39-BxfLCQd5pf4NU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c1847092-95c9-47b5-bb8d-cbbd822c3c7c",
    "url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c",
    "created_at": "2016-02-19T02:04:04Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2481",
    "organization_guid": "968fa119-82e6-435c-baaf-167498a3f66f",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/968fa119-82e6-435c-baaf-167498a3f66f",
    "developers_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/developers",
    "managers_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/managers",
    "auditors_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/auditors",
    "apps_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/apps",
    "routes_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/routes",
    "domains_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/domains",
    "service_instances_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/service_instances",
    "app_events_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/app_events",
    "events_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/events",
    "security_groups_url": "/v2/spaces/c1847092-95c9-47b5-bb8d-cbbd822c3c7c/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1278
X-Content-Type-Options: nosniff