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/6b9560bd-7148-4475-bd77-aeddc080dcda/security_groups/f840e661-1e50-4b9c-a48e-289f48174a11

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/security_groups/f840e661-1e50-4b9c-a48e-289f48174a11" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExIiwiZW1haWwiOiJlbWFpbC0xMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQyNjAxNTI1fQ.ioeRMK90M1XUhwegoyFdNZaxRfJcPae5vAJqw8U1Rew" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6b9560bd-7148-4475-bd77-aeddc080dcda",
    "url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda",
    "created_at": "2015-09-11T18:38:45Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-33",
    "organization_guid": "51650c99-25e7-4eec-b013-a14d3f616dda",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/51650c99-25e7-4eec-b013-a14d3f616dda",
    "developers_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/developers",
    "managers_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/managers",
    "auditors_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/auditors",
    "apps_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/apps",
    "routes_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/routes",
    "domains_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/domains",
    "service_instances_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/service_instances",
    "app_events_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/app_events",
    "events_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/events",
    "security_groups_url": "/v2/spaces/6b9560bd-7148-4475-bd77-aeddc080dcda/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: db21a8ea-f80f-400b-bdea-989c3931c958
Content-Length: 1276
X-Content-Type-Options: nosniff