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.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MyIsImVtYWlsIjoiZW1haWwtMTE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzJ9.TVniXBHByM29v0C_7qqD--9LAKhOW2gHceKCwnuvf-A
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/users/uaa-id-152/managed_spaces/63bd0115-0552-4625-8aed-0e81575f9c5b

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-152/managed_spaces/63bd0115-0552-4625-8aed-0e81575f9c5b" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MyIsImVtYWlsIjoiZW1haWwtMTE4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzJ9.TVniXBHByM29v0C_7qqD--9LAKhOW2gHceKCwnuvf-A" \
	-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: 7b937d44-ffb7-408d-8d18-c4b9e6fa0cc4
Content-Length: 845
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-152",
    "url": "/v2/users/uaa-id-152",
    "created_at": "2015-01-27T19:14:32Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "f4629a4b-268b-442f-a1de-03101e2ceca8",
    "default_space_url": "/v2/spaces/f4629a4b-268b-442f-a1de-03101e2ceca8",
    "spaces_url": "/v2/users/uaa-id-152/spaces",
    "organizations_url": "/v2/users/uaa-id-152/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-152/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-152/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-152/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-152/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-152/audited_spaces"
  }
}