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/72b0eae2-1de0-4f21-a87c-cc282141d894/security_groups/71ec582b-28fb-4d01-8feb-1fbec3819fbf

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/security_groups/71ec582b-28fb-4d01-8feb-1fbec3819fbf" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyMSIsImVtYWlsIjoiZW1haWwtMTUwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NTd9.5BQkgVssrAqn8fvlBVjtQ64xcamAT1hJryETLoX5Akk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "72b0eae2-1de0-4f21-a87c-cc282141d894",
    "url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894",
    "created_at": "2015-11-13T17:02:37Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1410",
    "organization_guid": "cd4ca7bd-fb2d-47f1-a1e2-3c94ba730d9b",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/cd4ca7bd-fb2d-47f1-a1e2-3c94ba730d9b",
    "developers_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/developers",
    "managers_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/managers",
    "auditors_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/auditors",
    "apps_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/apps",
    "routes_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/routes",
    "domains_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/domains",
    "service_instances_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/service_instances",
    "app_events_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/app_events",
    "events_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/events",
    "security_groups_url": "/v2/spaces/72b0eae2-1de0-4f21-a87c-cc282141d894/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 1278
X-Content-Type-Options: nosniff