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/a3046d29-9f26-4493-9d61-5ceef08e312d/security_groups/fb856109-9e61-46de-b517-4311452d9a8d

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/security_groups/fb856109-9e61-46de-b517-4311452d9a8d" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1NiIsImVtYWlsIjoiZW1haWwtMjYzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NDl9.bVOn2awsVKHthvYFKMgDaG9u7uug07F8WgOPqaRdfRs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "a3046d29-9f26-4493-9d61-5ceef08e312d",
    "url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d",
    "created_at": "2016-03-14T22:30:49Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2309",
    "organization_guid": "842e8408-a0c0-48d4-a04d-ca5474143a33",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/842e8408-a0c0-48d4-a04d-ca5474143a33",
    "developers_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/developers",
    "managers_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/managers",
    "auditors_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/auditors",
    "apps_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/apps",
    "routes_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/routes",
    "domains_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/domains",
    "service_instances_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/service_instances",
    "app_events_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/app_events",
    "events_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/events",
    "security_groups_url": "/v2/spaces/a3046d29-9f26-4493-9d61-5ceef08e312d/security_groups"
  }
}

Headers

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