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

Route

PUT /v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/security_groups/cd0d974b-8433-4616-97bb-57baa854f3c3

cURL

curl "https://api.[your-domain.com]/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/security_groups/cd0d974b-8433-4616-97bb-57baa854f3c3" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExMSIsImVtYWlsIjoiZW1haWwtNzNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDQ3MTY4OX0.hfMMU-Vt69FaJA3vmaDK5D1uSEQOToorDK0FwRJP764" \
	-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: 0040e837-7da9-44ea-b3fc-e4dcc92ec8e0
Content-Length: 1254
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "1db55c02-2784-452f-abc4-681cbd4e53f8",
    "url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8",
    "created_at": "2015-02-13T22:34:49Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-284",
    "organization_guid": "e66d7ea7-47fe-49a2-871f-e37e39bee287",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/e66d7ea7-47fe-49a2-871f-e37e39bee287",
    "developers_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/developers",
    "managers_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/managers",
    "auditors_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/auditors",
    "apps_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/apps",
    "routes_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/routes",
    "domains_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/domains",
    "service_instances_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/service_instances",
    "app_events_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/app_events",
    "events_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/events",
    "security_groups_url": "/v2/spaces/1db55c02-2784-452f-abc4-681cbd4e53f8/security_groups"
  }
}