Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/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.eyJ1c2VyX2lkIjoidWFhLWlkLTMwNSIsImVtYWlsIjoiZW1haWwtMjEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDd9.JXUjTAyYHv1j1VI3KUf1dF0yvQENbVnZ2EiztcZKfFk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwNSIsImVtYWlsIjoiZW1haWwtMjEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDd9.JXUjTAyYHv1j1VI3KUf1dF0yvQENbVnZ2EiztcZKfFk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "422393cb-1a3a-4e31-a9d5-0561402dd653",
    "url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653",
    "created_at": "2016-04-22T19:33:27Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1044",
    "organization_guid": "783fddd6-6e95-4994-a2b4-eb6127735f47",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/783fddd6-6e95-4994-a2b4-eb6127735f47",
    "developers_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/developers",
    "managers_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/managers",
    "auditors_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/auditors",
    "apps_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/apps",
    "routes_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/routes",
    "domains_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/domains",
    "service_instances_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/service_instances",
    "app_events_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/app_events",
    "events_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/events",
    "security_groups_url": "/v2/spaces/422393cb-1a3a-4e31-a9d5-0561402dd653/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: cee7e135-96eb-4d02-886b-ac46dfe668d6
Content-Length: 1278
X-Content-Type-Options: nosniff