Home
Version 3
Spaces API

Spaces API

Associate Security Group with the Space

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

Fields

Name Description Default Valid Values Example Values

Parameters

Name Description Valid Values Example Values
guid The guid of the Space

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NyIsImVtYWlsIjoiZW1haWwtMTQxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNDF9.5yBuOja9xdWWWBI7Add89XmvZMB0MOPUxbY64YmyKWU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/security_groups/5d4b00d1-f46a-4ef5-bc26-c080717b678d

cURL

curl "https://api.[your-domain.com]/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/security_groups/5d4b00d1-f46a-4ef5-bc26-c080717b678d" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NyIsImVtYWlsIjoiZW1haWwtMTQxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNDF9.5yBuOja9xdWWWBI7Add89XmvZMB0MOPUxbY64YmyKWU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3790142f-5c11-4703-8935-6fbf9c8b09e6
Content-Length: 1259
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "2cc7b0cd-7850-4fa0-b2d5-01d7746ac480",
    "url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480",
    "created_at": "2014-11-05T01:02:21+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "name-734",
    "organization_guid": "d874ca64-c090-4514-8417-bb74064e4a05",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/d874ca64-c090-4514-8417-bb74064e4a05",
    "developers_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/developers",
    "managers_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/managers",
    "auditors_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/auditors",
    "apps_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/apps",
    "routes_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/routes",
    "domains_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/domains",
    "service_instances_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/service_instances",
    "app_events_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/app_events",
    "events_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/events",
    "security_groups_url": "/v2/spaces/2cc7b0cd-7850-4fa0-b2d5-01d7746ac480/security_groups"
  }
}