Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/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.eyJ1c2VyX2lkIjoidWFhLWlkLTE4IiwiZW1haWwiOiJlbWFpbC0xNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU0NDUxNjA2fQ.6y_kZiNX-Q-0moCp_xGItgaH3Y2Y2io1pea0Ne6tMLU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4IiwiZW1haWwiOiJlbWFpbC0xNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU0NDUxNjA2fQ.6y_kZiNX-Q-0moCp_xGItgaH3Y2Y2io1pea0Ne6tMLU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "3a8314ef-9a87-4b28-8ef8-07be067c0d09",
    "url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09",
    "created_at": "2016-01-26T22:20:06Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-80",
    "organization_guid": "abc961a2-dc35-4c0f-81c5-b56c541fc817",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/abc961a2-dc35-4c0f-81c5-b56c541fc817",
    "developers_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/developers",
    "managers_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/managers",
    "auditors_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/auditors",
    "apps_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/apps",
    "routes_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/routes",
    "domains_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/domains",
    "service_instances_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/service_instances",
    "app_events_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/app_events",
    "events_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/events",
    "security_groups_url": "/v2/spaces/3a8314ef-9a87-4b28-8ef8-07be067c0d09/security_groups"
  }
}

Headers

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