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

Route

PUT /v2/users/uaa-id-57/managed_spaces/dff38ef5-0fdc-469e-aa83-6d747fca77a9

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-57/managed_spaces/dff38ef5-0fdc-469e-aa83-6d747fca77a9" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU4IiwiZW1haWwiOiJlbWFpbC00NEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTMyfQ.uAqttieJjz4WHgBROVu0NbbFKYPpX06ccRzsMBqD-pQ" \
	-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: 65a13a46-98f4-4695-9480-158f0dc54f23
Content-Length: 841
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-57",
    "url": "/v2/users/uaa-id-57",
    "created_at": "2014-11-05T01:02:12+00:00",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "6e466569-9baa-45cc-8934-9e73e739f3cb",
    "default_space_url": "/v2/spaces/6e466569-9baa-45cc-8934-9e73e739f3cb",
    "spaces_url": "/v2/users/uaa-id-57/spaces",
    "organizations_url": "/v2/users/uaa-id-57/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-57/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-57/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-57/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-57/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-57/audited_spaces"
  }
}