Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/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.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NyIsImVtYWlsIjoiZW1haWwtMTc5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTF9.NTDp2ko4BDBNpaVHaPYZyLP_mjq5VkKmvt-sVS0M-YI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NyIsImVtYWlsIjoiZW1haWwtMTc5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NTF9.NTDp2ko4BDBNpaVHaPYZyLP_mjq5VkKmvt-sVS0M-YI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "731c7d30-3b0a-4699-a936-a873ec8d2c9e",
    "url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e",
    "created_at": "2016-04-06T00:17:31Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-953",
    "organization_guid": "44ed2e0e-07f5-4015-b12a-7a35344ac0ea",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/44ed2e0e-07f5-4015-b12a-7a35344ac0ea",
    "developers_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/developers",
    "managers_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/managers",
    "auditors_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/auditors",
    "apps_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/apps",
    "routes_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/routes",
    "domains_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/domains",
    "service_instances_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/service_instances",
    "app_events_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/app_events",
    "events_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/events",
    "security_groups_url": "/v2/spaces/731c7d30-3b0a-4699-a936-a873ec8d2c9e/security_groups"
  }
}

Headers

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