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/317c2b3d-3415-42b8-a15c-a85f722167d5/security_groups/0d0717f9-0eee-4046-a46a-2895d762f22e

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/security_groups/0d0717f9-0eee-4046-a46a-2895d762f22e" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY5IiwiZW1haWwiOiJlbWFpbC0zOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1MzYyMjk3fQ.L8oIq4S-b2_lcysDL6BghrBs6yfj4V3iySmK4TXoTRc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "317c2b3d-3415-42b8-a15c-a85f722167d5",
    "url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5",
    "created_at": "2015-10-13T17:31:37Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-163",
    "organization_guid": "a5617ee2-b028-4c8b-a243-85230868a392",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/a5617ee2-b028-4c8b-a243-85230868a392",
    "developers_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/developers",
    "managers_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/managers",
    "auditors_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/auditors",
    "apps_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/apps",
    "routes_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/routes",
    "domains_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/domains",
    "service_instances_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/service_instances",
    "app_events_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/app_events",
    "events_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/events",
    "security_groups_url": "/v2/spaces/317c2b3d-3415-42b8-a15c-a85f722167d5/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 64773883-dc1d-4e39-9d31-01831b436110
Content-Length: 1277
X-Content-Type-Options: nosniff