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/e5b9de33-4c03-44c6-9f93-40cda828857f/security_groups/a7210fca-9615-4167-aef7-a913ae53cb18

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.eyJ1c2VyX2lkIjoidWFhLWlkLTY2IiwiZW1haWwiOiJlbWFpbC0zNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUzMzEwOTcyfQ.wLOb-PaZeCmhjU-m4hsEqsLLJ_7RWCOo9eLuMeQY-1Q
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/security_groups/a7210fca-9615-4167-aef7-a913ae53cb18" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY2IiwiZW1haWwiOiJlbWFpbC0zNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUzMzEwOTcyfQ.wLOb-PaZeCmhjU-m4hsEqsLLJ_7RWCOo9eLuMeQY-1Q" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e5b9de33-4c03-44c6-9f93-40cda828857f",
    "url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f",
    "created_at": "2016-01-13T17:29:32Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-113",
    "organization_guid": "87b9dbbe-b0fc-4039-af5b-72e76dc8c98d",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/87b9dbbe-b0fc-4039-af5b-72e76dc8c98d",
    "developers_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/developers",
    "managers_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/managers",
    "auditors_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/auditors",
    "apps_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/apps",
    "routes_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/routes",
    "domains_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/domains",
    "service_instances_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/service_instances",
    "app_events_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/app_events",
    "events_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/events",
    "security_groups_url": "/v2/spaces/e5b9de33-4c03-44c6-9f93-40cda828857f/security_groups"
  }
}

Headers

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