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/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/security_groups/fdf40582-a5a7-4d17-b5fc-c800247862f7

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/security_groups/fdf40582-a5a7-4d17-b5fc-c800247862f7" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTg4IiwiZW1haWwiOiJlbWFpbC01M0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ0MjYwNjM5fQ.5RF82510K9Sk42nJXPQaVKgeJ9VzJULZhj_GtKbRknE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "cc3ab804-974d-4056-a11b-0fa0d1e24e1b",
    "url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b",
    "created_at": "2015-09-30T23:30:39Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1143",
    "organization_guid": "ad215203-fd88-49f0-8f29-ca588ea00492",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/ad215203-fd88-49f0-8f29-ca588ea00492",
    "developers_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/developers",
    "managers_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/managers",
    "auditors_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/auditors",
    "apps_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/apps",
    "routes_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/routes",
    "domains_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/domains",
    "service_instances_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/service_instances",
    "app_events_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/app_events",
    "events_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/events",
    "security_groups_url": "/v2/spaces/cc3ab804-974d-4056-a11b-0fa0d1e24e1b/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 0be64693-cd3b-47e7-a192-99ecd16f6df4
Content-Length: 1278
X-Content-Type-Options: nosniff