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/2828dc97-c62e-4145-be8a-d0a9eae1b401/security_groups/f9f1d1f0-2512-4ebe-a4a2-8cca5c5c7244

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/security_groups/f9f1d1f0-2512-4ebe-a4a2-8cca5c5c7244" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNSIsImVtYWlsIjoiZW1haWwtNjdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzMyMzk1OX0.7YrNBqmJEi4ufOkhqrCaDP5816dnM8mda7boNv2R9Uc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2828dc97-c62e-4145-be8a-d0a9eae1b401",
    "url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401",
    "created_at": "2015-03-18T22:52:39Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-258",
    "organization_guid": "235f84c2-28a6-465b-90b3-54959014cbb9",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/235f84c2-28a6-465b-90b3-54959014cbb9",
    "developers_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/developers",
    "managers_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/managers",
    "auditors_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/auditors",
    "apps_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/apps",
    "routes_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/routes",
    "domains_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/domains",
    "service_instances_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/service_instances",
    "app_events_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/app_events",
    "events_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/events",
    "security_groups_url": "/v2/spaces/2828dc97-c62e-4145-be8a-d0a9eae1b401/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 7aa9e0fc-20a8-484f-a41c-62930940de21
Content-Length: 1254
X-Content-Type-Options: nosniff