Updating a User
PUT /v2/users/:guid
Request
Route
PUT /v2/users/uaa-id-196
Parameters
Name |
Description |
Valid Values |
Example Values |
guid
|
The guid of the User
|
|
|
Body
Name |
Description |
Default |
Valid Values |
Example Values |
default_space_guid
|
The guid of the default space for apps created by this user.
|
|
|
|
admin
|
Whether the user is an admin (Use UAA instead).
|
|
|
|
{
"default_space_guid": "d95eb82c-f90c-45b3-bdd2-e5a7b93745a7"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/users/uaa-id-196" -d '{
"default_space_guid": "d95eb82c-f90c-45b3-bdd2-e5a7b93745a7"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NyIsImVtYWlsIjoiZW1haWwtMTI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2MzB9.MmQSROsBLM7dgp_GZm338HMVO-0d6xf0IMQZ7Y1RWMI" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "uaa-id-196",
"url": "/v2/users/uaa-id-196",
"created_at": "2016-04-16T01:23:50Z",
"updated_at": "2016-04-16T01:23:50Z"
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": "d95eb82c-f90c-45b3-bdd2-e5a7b93745a7",
"default_space_url": "/v2/spaces/d95eb82c-f90c-45b3-bdd2-e5a7b93745a7",
"spaces_url": "/v2/users/uaa-id-196/spaces",
"organizations_url": "/v2/users/uaa-id-196/organizations",
"managed_organizations_url": "/v2/users/uaa-id-196/managed_organizations",
"billing_managed_organizations_url": "/v2/users/uaa-id-196/billing_managed_organizations",
"audited_organizations_url": "/v2/users/uaa-id-196/audited_organizations",
"managed_spaces_url": "/v2/users/uaa-id-196/managed_spaces",
"audited_spaces_url": "/v2/users/uaa-id-196/audited_spaces"
}
}
Headers