Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/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.eyJ1c2VyX2lkIjoidWFhLWlkLTQ4IiwiZW1haWwiOiJlbWFpbC0yNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc2fQ.QFzJQH4H45DNobBUQ_odMIEYVbO8Bj26xe9dX701UxM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ4IiwiZW1haWwiOiJlbWFpbC0yNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUxNDEzNjc2fQ.QFzJQH4H45DNobBUQ_odMIEYVbO8Bj26xe9dX701UxM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "fe75365e-f9fe-4f97-b44e-9523c0f389d7",
    "url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7",
    "created_at": "2015-12-22T18:27:56Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-86",
    "organization_guid": "1e052a7c-2ce1-4435-ad9f-663798a4d15c",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/1e052a7c-2ce1-4435-ad9f-663798a4d15c",
    "developers_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/developers",
    "managers_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/managers",
    "auditors_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/auditors",
    "apps_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/apps",
    "routes_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/routes",
    "domains_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/domains",
    "service_instances_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/service_instances",
    "app_events_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/app_events",
    "events_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/events",
    "security_groups_url": "/v2/spaces/fe75365e-f9fe-4f97-b44e-9523c0f389d7/security_groups"
  }
}

Headers

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