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-9/managed_spaces/6b38cc2c-5d4c-4ca9-95e3-adbb470dacb4

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-9/managed_spaces/6b38cc2c-5d4c-4ca9-95e3-adbb470dacb4" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwIiwiZW1haWwiOiJlbWFpbC01QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI1OTN9._NO119vv0ezQIAQvWuqkoY_POvzuGk3SDqjIpOD3l0Q" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-9",
    "url": "/v2/users/uaa-id-9",
    "created_at": "2015-08-31T21:49:53Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "02f24eb8-2cf5-49b0-b3d1-6ef047d38aff",
    "default_space_url": "/v2/spaces/02f24eb8-2cf5-49b0-b3d1-6ef047d38aff",
    "spaces_url": "/v2/users/uaa-id-9/spaces",
    "organizations_url": "/v2/users/uaa-id-9/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-9/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-9/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-9/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-9/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-9/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 2be8ca6f-6780-4a4d-a6e8-5521764268ac
Content-Length: 827
X-Content-Type-Options: nosniff