Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/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.eyJ1c2VyX2lkIjoidWFhLWlkLTE0OSIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTM3NDYyOH0.tVK0zmT0rpi0qg8wQhrzdUyUuLX4CyLmPxCYeAQqa6c
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0OSIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTM3NDYyOH0.tVK0zmT0rpi0qg8wQhrzdUyUuLX4CyLmPxCYeAQqa6c" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff",
    "url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff",
    "created_at": "2016-04-16T01:23:48Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-293",
    "organization_guid": "ac6d1930-d726-4a60-b1b7-36fa08d0856b",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/ac6d1930-d726-4a60-b1b7-36fa08d0856b",
    "developers_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/developers",
    "managers_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/managers",
    "auditors_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/auditors",
    "apps_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/apps",
    "routes_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/routes",
    "domains_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/domains",
    "service_instances_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/service_instances",
    "app_events_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/app_events",
    "events_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/events",
    "security_groups_url": "/v2/spaces/bcb8a746-6cb4-40a1-b1c3-dfcda579b8ff/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 61c60241-ff0a-4aeb-9e2e-cfd8fa24b46f
Content-Length: 1277
X-Content-Type-Options: nosniff