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.eyJ1c2VyX2lkIjoidWFhLWlkLTM1NiIsImVtYWlsIjoiZW1haWwtMjc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxNDN9.1TijCAfV0LEGF5nadJUOWN-usRdiUHaRg9s6IjlV_i8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/security_groups/7ef14356-4a3c-44b7-b11e-2cb1525290f1

cURL

curl "https://api.[your-domain.com]/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/security_groups/7ef14356-4a3c-44b7-b11e-2cb1525290f1" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1NiIsImVtYWlsIjoiZW1haWwtMjc3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxNDN9.1TijCAfV0LEGF5nadJUOWN-usRdiUHaRg9s6IjlV_i8" \
	-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: 5424c874-80b4-4172-8476-687567355da4
Content-Length: 1255
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "ef0ee841-ae81-4a04-890e-dbc771e5ff4f",
    "url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f",
    "created_at": "2015-02-12T01:42:23Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2015",
    "organization_guid": "f4863544-9211-48f6-b08e-6de2ee282fac",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/f4863544-9211-48f6-b08e-6de2ee282fac",
    "developers_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/developers",
    "managers_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/managers",
    "auditors_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/auditors",
    "apps_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/apps",
    "routes_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/routes",
    "domains_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/domains",
    "service_instances_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/service_instances",
    "app_events_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/app_events",
    "events_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/events",
    "security_groups_url": "/v2/spaces/ef0ee841-ae81-4a04-890e-dbc771e5ff4f/security_groups"
  }
}