Home
Version 3
Spaces API

Spaces API

Associate Manager with the Space by Username

PUT v2/spaces/:guid/managers

Request

Route

PUT v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/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.eyJ1c2VyX2lkIjoidWFhLWlkLTEwMCIsImVtYWlsIjoiZW1haWwtNTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDYzOX0.kRpw8DNs4i94DOEigdClpv-G0WfDxKV00dyMmJouDXE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/managers" -d '{
  "username": "user@example.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwMCIsImVtYWlsIjoiZW1haWwtNTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NDI2MDYzOX0.kRpw8DNs4i94DOEigdClpv-G0WfDxKV00dyMmJouDXE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "1e867470-752f-46a2-ab4f-895d092697f2",
    "url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2",
    "created_at": "2015-09-30T23:30:39Z",
    "updated_at": null
  },
  "entity": {
    "name": "name-1157",
    "organization_guid": "83b5094f-4e37-4e17-aba5-e4dc87446926",
    "space_quota_definition_guid": null,
    "allow_ssh": true,
    "organization_url": "/v2/organizations/83b5094f-4e37-4e17-aba5-e4dc87446926",
    "developers_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/developers",
    "managers_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/managers",
    "auditors_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/auditors",
    "apps_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/apps",
    "routes_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/routes",
    "domains_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/domains",
    "service_instances_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/service_instances",
    "app_events_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/app_events",
    "events_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/events",
    "security_groups_url": "/v2/spaces/1e867470-752f-46a2-ab4f-895d092697f2/security_groups"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 41f03a3e-4e5d-4e93-8159-01d84e8bbeda
Content-Length: 1278
X-Content-Type-Options: nosniff