Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/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.eyJ1c2VyX2lkIjoidWFhLWlkLTI2NyIsImVtYWlsIjoiZW1haWwtMjA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDR9.y2ltSa5VS9wMTYN13nkxUZXiwy2S9TBjLjrupnzBLe8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2NyIsImVtYWlsIjoiZW1haWwtMjA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDR9.y2ltSa5VS9wMTYN13nkxUZXiwy2S9TBjLjrupnzBLe8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "03f447ef-0d44-4438-8bdc-3535fc99b1f4",
    "url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4",
    "created_at": "2015-11-03T00:54:04Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1119",
    "organization_guid": "d878a00f-9818-405c-9d69-53c7d2dd597f",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/d878a00f-9818-405c-9d69-53c7d2dd597f",
    "developers_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/developers",
    "managers_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/managers",
    "auditors_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/auditors",
    "apps_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/apps",
    "routes_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/routes",
    "domains_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/domains",
    "service_instances_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/service_instances",
    "app_events_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/app_events",
    "events_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/events",
    "security_groups_url": "/v2/spaces/03f447ef-0d44-4438-8bdc-3535fc99b1f4/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d9c6697a-f559-45c9-ac0c-1ea7ed4dc363
Content-Length: 1278
X-Content-Type-Options: nosniff