Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/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.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MiIsImVtYWlsIjoiZW1haWwtMTY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NTl9.Y98Q_bKUfskahzf4osy9gB5MlUIun6crdbqQpZFGXvg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MiIsImVtYWlsIjoiZW1haWwtMTY3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NTl9.Y98Q_bKUfskahzf4osy9gB5MlUIun6crdbqQpZFGXvg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "903376e1-e667-45ef-9a5a-1e6bc36e01cc",
    "url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc",
    "created_at": "2015-11-13T17:02:39Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1470",
    "organization_guid": "66f8a201-4cd4-4c47-a64b-891e4084798c",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/66f8a201-4cd4-4c47-a64b-891e4084798c",
    "developers_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/developers",
    "managers_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/managers",
    "auditors_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/auditors",
    "apps_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/apps",
    "routes_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/routes",
    "domains_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/domains",
    "service_instances_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/service_instances",
    "app_events_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/app_events",
    "events_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/events",
    "security_groups_url": "/v2/spaces/903376e1-e667-45ef-9a5a-1e6bc36e01cc/security_groups"
  }
}

Headers

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