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/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/security_groups/ca20af14-a36d-4053-a2cb-58fe44e23794

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/security_groups/ca20af14-a36d-4053-a2cb-58fe44e23794" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OCIsImVtYWlsIjoiZW1haWwtMjEwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDZ9.AvaAJEoF77oXTrGEb0TdSXV58sPpo5d3irkU7O-Ys3s" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f9d7b9ab-9da1-4dc0-a142-c1e0643399bf",
    "url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf",
    "created_at": "2016-04-22T19:33:26Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1032",
    "organization_guid": "14d894c4-0a09-4fa7-a442-a3ac233be745",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/14d894c4-0a09-4fa7-a442-a3ac233be745",
    "developers_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/developers",
    "managers_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/managers",
    "auditors_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/auditors",
    "apps_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/apps",
    "routes_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/routes",
    "domains_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/domains",
    "service_instances_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/service_instances",
    "app_events_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/app_events",
    "events_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/events",
    "security_groups_url": "/v2/spaces/f9d7b9ab-9da1-4dc0-a142-c1e0643399bf/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f720d8c0-8caa-4094-b6a4-559916f3ed18
Content-Length: 1278
X-Content-Type-Options: nosniff