Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/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.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MiIsImVtYWlsIjoiZW1haWwtMjA4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyNzZ9.NByuUBf-kw4quH55jkRBvXpDw3AeNbt4ymufH1Roe8c
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MiIsImVtYWlsIjoiZW1haWwtMjA4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyNzZ9.NByuUBf-kw4quH55jkRBvXpDw3AeNbt4ymufH1Roe8c" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8",
    "url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8",
    "created_at": "2016-01-19T19:41:16Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-2006",
    "organization_guid": "d3759c92-8fcf-4a23-8b4e-2c730388faa6",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/d3759c92-8fcf-4a23-8b4e-2c730388faa6",
    "developers_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/developers",
    "managers_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/managers",
    "auditors_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/auditors",
    "apps_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/apps",
    "routes_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/routes",
    "domains_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/domains",
    "service_instances_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/service_instances",
    "app_events_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/app_events",
    "events_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/events",
    "security_groups_url": "/v2/spaces/f1f9ccd9-4c04-48c8-b49d-caa3c7a214f8/security_groups"
  }
}

Headers

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