Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/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.eyJ1c2VyX2lkIjoidWFhLWlkLTIzMCIsImVtYWlsIjoiZW1haWwtMTQ3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2NzV9.Pp-aZJidmT5JREg_21svpYx0ddj_a-upqMDiy9Xf9Cc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzMCIsImVtYWlsIjoiZW1haWwtMTQ3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2NzV9.Pp-aZJidmT5JREg_21svpYx0ddj_a-upqMDiy9Xf9Cc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "01a4017d-3537-4e56-b409-e67e7ef66656",
    "url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656",
    "created_at": "2016-03-17T21:41:15Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-849",
    "organization_guid": "b9777e51-ccc3-4c62-af3b-462477d8d006",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/b9777e51-ccc3-4c62-af3b-462477d8d006",
    "developers_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/developers",
    "managers_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/managers",
    "auditors_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/auditors",
    "apps_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/apps",
    "routes_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/routes",
    "domains_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/domains",
    "service_instances_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/service_instances",
    "app_events_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/app_events",
    "events_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/events",
    "security_groups_url": "/v2/spaces/01a4017d-3537-4e56-b409-e67e7ef66656/security_groups"
  }
}

Headers

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