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

Route

PUT /v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/security_groups/fdddb312-c7ba-4ded-bd45-2937b6a828d2

cURL

curl "https://api.[your-domain.com]/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/security_groups/fdddb312-c7ba-4ded-bd45-2937b6a828d2" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NCIsImVtYWlsIjoiZW1haWwtMTc2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzJ9.lxKyzP-FW0GQwnSDqh1mnWUykhqNZ99PS65pq3qkP3k" \
	-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: d6a93f75-6196-4de5-92d2-2d2feeddb6aa
Content-Length: 1255
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "4b71a56f-b53f-404d-9469-2a15c5f7bd36",
    "url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36",
    "created_at": "2015-02-10T01:42:52Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1345",
    "organization_guid": "cac478f3-7bc0-4570-addf-f4173fbab74f",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/cac478f3-7bc0-4570-addf-f4173fbab74f",
    "developers_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/developers",
    "managers_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/managers",
    "auditors_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/auditors",
    "apps_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/apps",
    "routes_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/routes",
    "domains_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/domains",
    "service_instances_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/service_instances",
    "app_events_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/app_events",
    "events_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/events",
    "security_groups_url": "/v2/spaces/4b71a56f-b53f-404d-9469-2a15c5f7bd36/security_groups"
  }
}