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/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/security_groups/06714b20-6e6d-418d-98b9-ab569ee9afad

Parameters

Name Description Valid Values Example Values
guid The guid of the Space

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk4IiwiZW1haWwiOiJlbWFpbC02NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI3NDgwODQ0fQ.jfl0ZNUDv3Zax8T44Hu6CssA4Z85-YUPa5cE6Z_SHvE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/security_groups/06714b20-6e6d-418d-98b9-ab569ee9afad" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk4IiwiZW1haWwiOiJlbWFpbC02NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI3NDgwODQ0fQ.jfl0ZNUDv3Zax8T44Hu6CssA4Z85-YUPa5cE6Z_SHvE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8",
    "url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8",
    "created_at": "2015-03-20T18:27:24Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-242",
    "organization_guid": "eb0cc54f-9516-4b76-8a83-50435806e31d",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/eb0cc54f-9516-4b76-8a83-50435806e31d",
    "developers_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/developers",
    "managers_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/managers",
    "auditors_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/auditors",
    "apps_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/apps",
    "routes_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/routes",
    "domains_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/domains",
    "service_instances_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/service_instances",
    "app_events_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/app_events",
    "events_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/events",
    "security_groups_url": "/v2/spaces/b3a8cae6-4a59-47c8-aea9-8e77a5e1d0b8/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 220304c6-972b-4ee7-bb4b-1dc00ffad2a8
Content-Length: 1254
X-Content-Type-Options: nosniff