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/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/security_groups/fabde83b-5787-417e-bca5-eb201b0eedd6

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI1IiwiZW1haWwiOiJlbWFpbC0xNEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc2fQ.1ly3g6yEdEwBoS7D1litRjnpZuIwc5NW26jhRm-ogkk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/security_groups/fabde83b-5787-417e-bca5-eb201b0eedd6" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1IiwiZW1haWwiOiJlbWFpbC0xNEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc2fQ.1ly3g6yEdEwBoS7D1litRjnpZuIwc5NW26jhRm-ogkk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6c9dc6c0-470e-4f11-b277-b4a737c70dc4",
    "url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4",
    "created_at": "2015-12-22T18:27:56Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-46",
    "organization_guid": "7a23b997-c51c-4a3b-97be-00c48540cfb9",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/7a23b997-c51c-4a3b-97be-00c48540cfb9",
    "developers_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/developers",
    "managers_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/managers",
    "auditors_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/auditors",
    "apps_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/apps",
    "routes_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/routes",
    "domains_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/domains",
    "service_instances_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/service_instances",
    "app_events_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/app_events",
    "events_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/events",
    "security_groups_url": "/v2/spaces/6c9dc6c0-470e-4f11-b277-b4a737c70dc4/security_groups"
  }
}

Headers

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