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/62778cfa-0999-4307-a38b-52ec8c897654/security_groups/d9451def-f491-4b11-ac7b-5724ef72bd75

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/security_groups/d9451def-f491-4b11-ac7b-5724ef72bd75" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2MiIsImVtYWlsIjoiZW1haWwtOTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyOTY2NDEzOH0.t5uWcQ7TCDed4JDHLoAvoaClCEAbGmfPTmTsm5tLOtM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "62778cfa-0999-4307-a38b-52ec8c897654",
    "url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654",
    "created_at": "2015-04-15T00:55:38Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1206",
    "organization_guid": "a7a599e7-9c32-4d60-8b1a-35fa7447089e",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/a7a599e7-9c32-4d60-8b1a-35fa7447089e",
    "developers_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/developers",
    "managers_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/managers",
    "auditors_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/auditors",
    "apps_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/apps",
    "routes_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/routes",
    "domains_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/domains",
    "service_instances_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/service_instances",
    "app_events_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/app_events",
    "events_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/events",
    "security_groups_url": "/v2/spaces/62778cfa-0999-4307-a38b-52ec8c897654/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6fd7b3fd-5d56-4bc0-96dc-53f554b72d44
Content-Length: 1255
X-Content-Type-Options: nosniff