Home
Version 3
Users API

Users API

Associate Managed Space with the User

PUT /v2/users/:guid/managed_spaces/:managed_space_guid

Request

Route

PUT /v2/users/uaa-id-63/managed_spaces/86c108a8-e7ff-4466-8ec5-1f9698521549

Parameters

Name Description Valid Values Example Values
guid The guid of the User
managed_space_guid The guid of the managed space

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY0IiwiZW1haWwiOiJlbWFpbC00MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUzODM3MjU1fQ.1HuDRnMM653WPZjYpKANwkIzaaJ6znb1hmUluF6KP9Y
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-63/managed_spaces/86c108a8-e7ff-4466-8ec5-1f9698521549" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY0IiwiZW1haWwiOiJlbWFpbC00MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDUzODM3MjU1fQ.1HuDRnMM653WPZjYpKANwkIzaaJ6znb1hmUluF6KP9Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-63",
    "url": "/v2/users/uaa-id-63",
    "created_at": "2016-01-19T19:40:55Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "70f3d069-a6f6-47bd-8ba1-ab228b269ea8",
    "default_space_url": "/v2/spaces/70f3d069-a6f6-47bd-8ba1-ab228b269ea8",
    "spaces_url": "/v2/users/uaa-id-63/spaces",
    "organizations_url": "/v2/users/uaa-id-63/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-63/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-63/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-63/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-63/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-63/audited_spaces"
  }
}

Headers

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