Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/managers

Parameters

Name Description Valid Values Example Values
guid The guid of the Space

Body

Name Description Default Valid Values Example Values
username The user's name
  • user@example.com
{
  "username": "user@example.com"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUxIiwiZW1haWwiOiJlbWFpbC0yOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ5NTMxNTA4fQ.IFozQqwtARO69rVr8UrCysxrXkrfqSRpZcXkfM9kkJI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUxIiwiZW1haWwiOiJlbWFpbC0yOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ5NTMxNTA4fQ.IFozQqwtARO69rVr8UrCysxrXkrfqSRpZcXkfM9kkJI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "4351f97b-3485-4738-821b-5bf77bed44eb",
    "url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb",
    "created_at": "2015-11-30T23:38:28Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-98",
    "organization_guid": "a488910d-2d69-46a2-bf6e-319248e03705",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/a488910d-2d69-46a2-bf6e-319248e03705",
    "developers_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/developers",
    "managers_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/managers",
    "auditors_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/auditors",
    "apps_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/apps",
    "routes_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/routes",
    "domains_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/domains",
    "service_instances_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/service_instances",
    "app_events_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/app_events",
    "events_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/events",
    "security_groups_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/security_groups"
  }
}

Headers

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