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

Route

PUT /v2/users/uaa-id-298/managed_spaces/0c240e2d-f839-4db4-b18a-f93bf211f9ba

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-298/managed_spaces/0c240e2d-f839-4db4-b18a-f93bf211f9ba" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OSIsImVtYWlsIjoiZW1haWwtMjA1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDJ9.sw5LdZBsjnbrUHwIWYRzFPW62BFmjVZF2OHi33Q_erk" \
	-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: ae79c014-be67-4779-86de-eb5591038a92
Content-Length: 845
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-298",
    "url": "/v2/users/uaa-id-298",
    "created_at": "2015-02-13T22:35:01Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "e3dfb027-8ed3-4cfe-98dd-c6d1641d5979",
    "default_space_url": "/v2/spaces/e3dfb027-8ed3-4cfe-98dd-c6d1641d5979",
    "spaces_url": "/v2/users/uaa-id-298/spaces",
    "organizations_url": "/v2/users/uaa-id-298/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-298/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-298/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-298/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-298/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-298/audited_spaces"
  }
}