Spaces API

Associate Security Group with the Space

PUT /v2/spaces/:guid/security_groups/:security_group_guid

Request

Route

PUT /v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/security_groups/671706ff-f2e4-4482-925b-8627b5442e4d

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.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NiIsImVtYWlsIjoiZW1haWwtMjU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDB9.gOFNsKwhlxSBUDfHa2HdoVIQ2rzG3SKNdTaEXHa_9T0
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/security_groups/671706ff-f2e4-4482-925b-8627b5442e4d" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NiIsImVtYWlsIjoiZW1haWwtMjU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg5MDB9.gOFNsKwhlxSBUDfHa2HdoVIQ2rzG3SKNdTaEXHa_9T0" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "d9656dab-0610-4625-9092-4a0b53456a19",
    "url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19",
    "created_at": "2016-06-08T16:41:40Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "name": "name-2074",
    "organization_guid": "a5a37625-b0de-47e1-bfe8-7ed5a482b36f",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/a5a37625-b0de-47e1-bfe8-7ed5a482b36f",
    "developers_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/developers",
    "managers_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/managers",
    "auditors_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/auditors",
    "apps_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/apps",
    "routes_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/routes",
    "domains_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/domains",
    "service_instances_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/service_instances",
    "app_events_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/app_events",
    "events_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/events",
    "security_groups_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/security_groups",
    "staging_security_groups_url": "/v2/spaces/d9656dab-0610-4625-9092-4a0b53456a19/staging_security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4cc61f5c-f884-43f7-990a-7aa7bd35875f
Content-Length: 1278
X-Content-Type-Options: nosniff