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

Route

PUT /v2/users/uaa-id-323/managed_spaces/6c5f0f33-ba05-4343-85c6-8326f1a19455

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-323/managed_spaces/6c5f0f33-ba05-4343-85c6-8326f1a19455" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyNCIsImVtYWlsIjoiZW1haWwtMjM2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5Nzh9.y0A4UPbXyak3SUS4_7AXrrPVtG0c2T422wwrJuasbLc" \
	-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: ce91fc06-0716-4ad4-b54e-cd9731924e45
Content-Length: 850
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-323",
    "url": "/v2/users/uaa-id-323",
    "created_at": "2014-12-24T01:39:38+00:00",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "3083c0c7-cb22-483a-8bec-e944e2a0a188",
    "default_space_url": "/v2/spaces/3083c0c7-cb22-483a-8bec-e944e2a0a188",
    "spaces_url": "/v2/users/uaa-id-323/spaces",
    "organizations_url": "/v2/users/uaa-id-323/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-323/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-323/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-323/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-323/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-323/audited_spaces"
  }
}