Home
Version 3
Users API

Users API

Associate Managed Space with the User

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

Fields

Name Description Default Valid Values Example Values

Parameters

Name Description Valid Values Example Values
guid The guid of the User

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ4IiwiZW1haWwiOiJlbWFpbC0yOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MzEwMTIxfQ.tD2rQlmUG5FkSyLBaabFa4vt0rF4PHukjljgQgs8wiw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/users/uaa-id-47/managed_spaces/5a078a4b-88aa-4831-b2b2-837804c8bfda

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-47/managed_spaces/5a078a4b-88aa-4831-b2b2-837804c8bfda" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ4IiwiZW1haWwiOiJlbWFpbC0yOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MzEwMTIxfQ.tD2rQlmUG5FkSyLBaabFa4vt0rF4PHukjljgQgs8wiw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6cd7ba6a-522c-4520-9702-280dcb247849
Content-Length: 836
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-47",
    "url": "/v2/users/uaa-id-47",
    "created_at": "2015-02-12T01:42:01Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "104466a1-37f3-483a-849f-c30fc191dfe2",
    "default_space_url": "/v2/spaces/104466a1-37f3-483a-849f-c30fc191dfe2",
    "spaces_url": "/v2/users/uaa-id-47/spaces",
    "organizations_url": "/v2/users/uaa-id-47/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-47/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-47/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-47/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-47/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-47/audited_spaces"
  }
}