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-426/managed_spaces/52ef1384-1aed-4cc2-a21f-4d57d94348b9

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.eyJ1c2VyX2lkIjoidWFhLWlkLTQyNyIsImVtYWlsIjoiZW1haWwtMjk1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NTB9.Rm5iNAM8WIYlM7bgWcwDtvgwIctEGU2S5YVHZJ7BHMg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-426/managed_spaces/52ef1384-1aed-4cc2-a21f-4d57d94348b9" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyNyIsImVtYWlsIjoiZW1haWwtMjk1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDI2MDE1NTB9.Rm5iNAM8WIYlM7bgWcwDtvgwIctEGU2S5YVHZJ7BHMg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-426",
    "url": "/v2/users/uaa-id-426",
    "created_at": "2015-09-11T18:39:10Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "b28a1431-a273-47f4-a643-31e3dc3d98a3",
    "default_space_url": "/v2/spaces/b28a1431-a273-47f4-a643-31e3dc3d98a3",
    "spaces_url": "/v2/users/uaa-id-426/spaces",
    "organizations_url": "/v2/users/uaa-id-426/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-426/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-426/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-426/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-426/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-426/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 497d694d-8e29-4eb0-ab53-abd1e93d5e2b
Content-Length: 845
X-Content-Type-Options: nosniff