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/0552a490-6d80-4b02-9d07-49a52a583bcd/security_groups/510728d3-81fa-41ee-a1ab-4d8641f9ec99

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

cURL

curl "https://api.[your-domain.com]/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/security_groups/510728d3-81fa-41ee-a1ab-4d8641f9ec99" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NiIsImVtYWlsIjoiZW1haWwtMTQ3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2Njd9.woNpFIX-HN6G8yVg7UEfCK750Y2FtnAQsdisfuZxA1I" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "0552a490-6d80-4b02-9d07-49a52a583bcd",
    "url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd",
    "created_at": "2015-03-03T00:51:07Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1248",
    "organization_guid": "bf49c210-88e3-48b4-8971-35434d34ea4d",
    "space_quota_definition_guid": null,
    "organization_url": "/v2/organizations/bf49c210-88e3-48b4-8971-35434d34ea4d",
    "developers_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/developers",
    "managers_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/managers",
    "auditors_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/auditors",
    "apps_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/apps",
    "routes_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/routes",
    "domains_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/domains",
    "service_instances_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/service_instances",
    "app_events_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/app_events",
    "events_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/events",
    "security_groups_url": "/v2/spaces/0552a490-6d80-4b02-9d07-49a52a583bcd/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 5746e23c-1d0f-4e21-8680-d1170cdde4fd
Content-Length: 1255
X-Content-Type-Options: nosniff