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/0e975a6a-3137-4295-a418-2c63a2f6a147/security_groups/8cf273d4-48d0-4315-be21-91a378f31ad9

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/security_groups/8cf273d4-48d0-4315-be21-91a378f31ad9" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OCIsImVtYWlsIjoiZW1haWwtMjkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzUwMDB9.YYQZI3LhmhOMplIQkQvYy2wLjuxyA4MjzYtjZGyWdt4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "0e975a6a-3137-4295-a418-2c63a2f6a147",
    "url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147",
    "created_at": "2015-05-21T01:03:20Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2245",
    "organization_guid": "7c1a4fa2-8074-4b3f-875b-47b6ed0ac604",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/7c1a4fa2-8074-4b3f-875b-47b6ed0ac604",
    "developers_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/developers",
    "managers_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/managers",
    "auditors_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/auditors",
    "apps_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/apps",
    "routes_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/routes",
    "domains_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/domains",
    "service_instances_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/service_instances",
    "app_events_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/app_events",
    "events_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/events",
    "security_groups_url": "/v2/spaces/0e975a6a-3137-4295-a418-2c63a2f6a147/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: e1003027-f24a-401f-ab83-7f0f9d0861e5
Content-Length: 1278
X-Content-Type-Options: nosniff