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/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/security_groups/094147a0-8147-4430-ac03-8808c173d9ae

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.eyJ1c2VyX2lkIjoidWFhLWlkLTExMyIsImVtYWlsIjoiZW1haWwtNzdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTM3NDYyN30.lmxp0m28Tk1ceTd8BGgt_aD9ap3vPEW3VYmaMw-6XDw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/security_groups/094147a0-8147-4430-ac03-8808c173d9ae" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExMyIsImVtYWlsIjoiZW1haWwtNzdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTM3NDYyN30.lmxp0m28Tk1ceTd8BGgt_aD9ap3vPEW3VYmaMw-6XDw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "aa70191f-e456-4154-a4b7-0fbb0d1c5cbf",
    "url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf",
    "created_at": "2016-04-16T01:23:47Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-247",
    "organization_guid": "ea97eca1-94de-49e0-a7a2-ff355db8680c",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/ea97eca1-94de-49e0-a7a2-ff355db8680c",
    "developers_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/developers",
    "managers_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/managers",
    "auditors_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/auditors",
    "apps_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/apps",
    "routes_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/routes",
    "domains_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/domains",
    "service_instances_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/service_instances",
    "app_events_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/app_events",
    "events_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/events",
    "security_groups_url": "/v2/spaces/aa70191f-e456-4154-a4b7-0fbb0d1c5cbf/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b8250429-c00d-4a5e-9f76-ec79393502b2
Content-Length: 1277
X-Content-Type-Options: nosniff