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/e6da5a11-63f2-4020-95e2-cdc0f88c393d/security_groups/b09611a1-35a0-478b-acef-b2c595f23a39

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/security_groups/b09611a1-35a0-478b-acef-b2c595f23a39" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExNiIsImVtYWlsIjoiZW1haWwtNjdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzNjgyOTc3OH0.zm8EUwF_MhO3xcIjqe3FX5zJUXqeLCDbWdskkoQ_1A8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e6da5a11-63f2-4020-95e2-cdc0f88c393d",
    "url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d",
    "created_at": "2015-07-06T23:22:58Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-309",
    "organization_guid": "33522d16-17f5-4cd2-b3dd-974c88ebd5e3",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/33522d16-17f5-4cd2-b3dd-974c88ebd5e3",
    "developers_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/developers",
    "managers_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/managers",
    "auditors_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/auditors",
    "apps_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/apps",
    "routes_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/routes",
    "domains_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/domains",
    "service_instances_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/service_instances",
    "app_events_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/app_events",
    "events_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/events",
    "security_groups_url": "/v2/spaces/e6da5a11-63f2-4020-95e2-cdc0f88c393d/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 78e9e5d6-2cf2-4b09-b228-0a614b13638a
Content-Length: 1277
X-Content-Type-Options: nosniff