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/ed511ead-32e2-43f6-8a23-b6b1051aae43/security_groups/c6db6a3d-deee-4e25-8503-651b73216a00

Parameters

Name Description Valid Values Example Values
guid The guid of the Space

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExMCIsImVtYWlsIjoiZW1haWwtNTlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMTY0NjYzMH0.C38a7V6nkN24UKl74Mm3UHU2QCcm1VKqwbZnNNE5OnM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/security_groups/c6db6a3d-deee-4e25-8503-651b73216a00" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExMCIsImVtYWlsIjoiZW1haWwtNTlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMTY0NjYzMH0.C38a7V6nkN24UKl74Mm3UHU2QCcm1VKqwbZnNNE5OnM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "ed511ead-32e2-43f6-8a23-b6b1051aae43",
    "url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43",
    "created_at": "2015-05-07T23:37:10Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1020",
    "organization_guid": "4e1e57ac-f21b-4a76-843b-aa3ca8da3c3c",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/4e1e57ac-f21b-4a76-843b-aa3ca8da3c3c",
    "developers_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/developers",
    "managers_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/managers",
    "auditors_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/auditors",
    "apps_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/apps",
    "routes_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/routes",
    "domains_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/domains",
    "service_instances_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/service_instances",
    "app_events_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/app_events",
    "events_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/events",
    "security_groups_url": "/v2/spaces/ed511ead-32e2-43f6-8a23-b6b1051aae43/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 25a75a6f-58c5-4103-881f-a313f589c2f6
Content-Length: 1278
X-Content-Type-Options: nosniff