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/0967610e-b1d7-4976-9702-950af7053f3d/security_groups/2e2964e5-2440-466a-b714-e57c668bf3e4

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/security_groups/2e2964e5-2440-466a-b714-e57c668bf3e4" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY0IiwiZW1haWwiOiJlbWFpbC0zMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU0NDUxNjA3fQ.Lgwh4vUGz4jWHO8rmiDhLnhw2GcxuIWE7tnkiWoR1WM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "0967610e-b1d7-4976-9702-950af7053f3d",
    "url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d",
    "created_at": "2016-01-26T22:20:07Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-131",
    "organization_guid": "c1eee63b-045b-491a-b622-b7e24070b5f9",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/c1eee63b-045b-491a-b622-b7e24070b5f9",
    "developers_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/developers",
    "managers_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/managers",
    "auditors_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/auditors",
    "apps_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/apps",
    "routes_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/routes",
    "domains_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/domains",
    "service_instances_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/service_instances",
    "app_events_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/app_events",
    "events_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/events",
    "security_groups_url": "/v2/spaces/0967610e-b1d7-4976-9702-950af7053f3d/security_groups"
  }
}

Headers

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