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/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/security_groups/41170edb-e37d-42d8-9f00-6e71545ef414

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3NyIsImVtYWlsIjoiZW1haWwtMjkzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NjZ9.sye8dt110vXuPCshN-kceYyPF21_pAIQEhGso7-VdQ4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/security_groups/41170edb-e37d-42d8-9f00-6e71545ef414" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3NyIsImVtYWlsIjoiZW1haWwtMjkzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NjZ9.sye8dt110vXuPCshN-kceYyPF21_pAIQEhGso7-VdQ4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c300395d-bb5d-48c6-bb3c-fa319dcd6fd1",
    "url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1",
    "created_at": "2015-06-16T23:41:06Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2250",
    "organization_guid": "79c27bb4-5c2d-44a4-a77d-7c2c8aa943ab",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/79c27bb4-5c2d-44a4-a77d-7c2c8aa943ab",
    "developers_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/developers",
    "managers_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/managers",
    "auditors_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/auditors",
    "apps_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/apps",
    "routes_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/routes",
    "domains_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/domains",
    "service_instances_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/service_instances",
    "app_events_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/app_events",
    "events_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/events",
    "security_groups_url": "/v2/spaces/c300395d-bb5d-48c6-bb3c-fa319dcd6fd1/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 2c4c8442-796c-4dac-89a0-04ba0c2c23c8
Content-Length: 1278
X-Content-Type-Options: nosniff