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/4b7b130d-8b2c-4abb-b035-20b823115529/security_groups/766ef524-2d1a-454c-9c58-72a7da463835

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.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NCIsImVtYWlsIjoiZW1haWwtMTM2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzIzMTM2MTR9.OkmyvfHzmiynpbAkTApev5uPfP-d-KTXz5UHhweyKNg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/security_groups/766ef524-2d1a-454c-9c58-72a7da463835" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NCIsImVtYWlsIjoiZW1haWwtMTM2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzIzMTM2MTR9.OkmyvfHzmiynpbAkTApev5uPfP-d-KTXz5UHhweyKNg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "4b7b130d-8b2c-4abb-b035-20b823115529",
    "url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529",
    "created_at": "2015-05-15T16:53:34Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-761",
    "organization_guid": "0b536700-1fc8-46cf-ae86-198a086fe16c",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/0b536700-1fc8-46cf-ae86-198a086fe16c",
    "developers_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/developers",
    "managers_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/managers",
    "auditors_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/auditors",
    "apps_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/apps",
    "routes_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/routes",
    "domains_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/domains",
    "service_instances_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/service_instances",
    "app_events_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/app_events",
    "events_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/events",
    "security_groups_url": "/v2/spaces/4b7b130d-8b2c-4abb-b035-20b823115529/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b5320f64-7e51-4b52-a52d-58b4018d2b12
Content-Length: 1277
X-Content-Type-Options: nosniff