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-442/managed_spaces/82be4347-f950-49f3-b1a0-f1b37289cef0

Parameters

Name Description Valid Values Example Values
guid The guid of the User
managed_space_guid The guid of the managed space

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0MyIsImVtYWlsIjoiZW1haWwtMzI5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NTV9.ZnbqpHU_-bI87QxFwRD86aUBYwD7cIXL65C9hQp4x6o
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-442/managed_spaces/82be4347-f950-49f3-b1a0-f1b37289cef0" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0MyIsImVtYWlsIjoiZW1haWwtMzI5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NTV9.ZnbqpHU_-bI87QxFwRD86aUBYwD7cIXL65C9hQp4x6o" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-442",
    "url": "/v2/users/uaa-id-442",
    "created_at": "2016-03-14T22:30:55Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "7b3aa272-86d3-4d0c-a213-2d536c0fe89f",
    "default_space_url": "/v2/spaces/7b3aa272-86d3-4d0c-a213-2d536c0fe89f",
    "spaces_url": "/v2/users/uaa-id-442/spaces",
    "organizations_url": "/v2/users/uaa-id-442/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-442/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-442/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-442/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-442/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-442/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 845
X-Content-Type-Options: nosniff