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-24/managed_spaces/9def0d56-df63-40ac-bf05-0d1ca7a501d8

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-24/managed_spaces/9def0d56-df63-40ac-bf05-0d1ca7a501d8" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1IiwiZW1haWwiOiJlbWFpbC0xMUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1NTU3OTI4fQ.S4AcgfxN-hFqVuFWg7UBXfs3MCqY9hLxmRFYbh0nWXE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-24",
    "url": "/v2/users/uaa-id-24",
    "created_at": "2015-10-15T23:52:08Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "0f4e1d3c-9d26-4f67-82ec-cb498768c653",
    "default_space_url": "/v2/spaces/0f4e1d3c-9d26-4f67-82ec-cb498768c653",
    "spaces_url": "/v2/users/uaa-id-24/spaces",
    "organizations_url": "/v2/users/uaa-id-24/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-24/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-24/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-24/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-24/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-24/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 30f0ecca-510e-4928-a763-6aa1d1ab2cad
Content-Length: 836
X-Content-Type-Options: nosniff