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-209/managed_spaces/195da506-5a13-46e0-a3c9-4a13da53bbb3

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxMCIsImVtYWlsIjoiZW1haWwtMTU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NTR9.XqcNjMj3V3MZklR2xiRqaeCkm-wPnMMe2oikx8XmJH8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-209/managed_spaces/195da506-5a13-46e0-a3c9-4a13da53bbb3" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxMCIsImVtYWlsIjoiZW1haWwtMTU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NTR9.XqcNjMj3V3MZklR2xiRqaeCkm-wPnMMe2oikx8XmJH8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-209",
    "url": "/v2/users/uaa-id-209",
    "created_at": "2015-06-16T23:40:53Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "a6c9c61a-6d6d-43d3-a3a0-fb123ec6b49e",
    "default_space_url": "/v2/spaces/a6c9c61a-6d6d-43d3-a3a0-fb123ec6b49e",
    "spaces_url": "/v2/users/uaa-id-209/spaces",
    "organizations_url": "/v2/users/uaa-id-209/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-209/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-209/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-209/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-209/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-209/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 21ddea6f-fda1-4303-96bd-6ac29209fd0a
Content-Length: 845
X-Content-Type-Options: nosniff