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-191/managed_spaces/e73f2129-d4b0-4ba0-ae2d-ea79c9bb9834

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

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-191/managed_spaces/e73f2129-d4b0-4ba0-ae2d-ea79c9bb9834" -d '' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MiIsImVtYWlsIjoiZW1haWwtMTMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MDR9.RyUP9_wp1nyUZUT9L_9Uo18xv8-Yeh9RuzQBRCvUxjE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-191",
    "url": "/v2/users/uaa-id-191",
    "created_at": "2015-03-10T23:11:44Z",
    "updated_at": null
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "db3ab4d9-356e-4fa4-8385-b9254cd2c4e5",
    "default_space_url": "/v2/spaces/db3ab4d9-356e-4fa4-8385-b9254cd2c4e5",
    "spaces_url": "/v2/users/uaa-id-191/spaces",
    "organizations_url": "/v2/users/uaa-id-191/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-191/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-191/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-191/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-191/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-191/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 46a10072-c38a-4d5a-9b1c-3708cfa2fd5b
Content-Length: 845
X-Content-Type-Options: nosniff