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/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/security_groups/5061e99a-c227-4b25-899e-8df02f90ec53

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/security_groups/5061e99a-c227-4b25-899e-8df02f90ec53" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3OCIsImVtYWlsIjoiZW1haWwtMTAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NDB9.WhPVi4jrxwWCwY70JEEByQWaaakF6GAiNPITScwkeXg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "aba384b0-b4f1-4f43-9f56-ba90cc06ad83",
    "url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83",
    "created_at": "2015-10-15T23:52:20Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1381",
    "organization_guid": "6b5c79b5-9d44-4922-8af9-11676bf89824",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/6b5c79b5-9d44-4922-8af9-11676bf89824",
    "developers_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/developers",
    "managers_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/managers",
    "auditors_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/auditors",
    "apps_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/apps",
    "routes_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/routes",
    "domains_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/domains",
    "service_instances_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/service_instances",
    "app_events_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/app_events",
    "events_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/events",
    "security_groups_url": "/v2/spaces/aba384b0-b4f1-4f43-9f56-ba90cc06ad83/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b62a987f-9336-4fe2-b8ca-ba9f5b327994
Content-Length: 1278
X-Content-Type-Options: nosniff