Updating a User
PUT /v2/users/:guid
Request
Route
PUT /v2/users/uaa-id-307
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": "b8b6a088-fb9f-4b75-ab3e-1dd5e2afa588"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/users/uaa-id-307" -d '{
"default_space_guid": "b8b6a088-fb9f-4b75-ab3e-1dd5e2afa588"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwOCIsImVtYWlsIjoiZW1haWwtMjA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NTF9.929nBzrAdFsA28Vb0VToIPppklyuH2t4Yv0fn_nVFjA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "uaa-id-307",
"url": "/v2/users/uaa-id-307",
"created_at": "2015-09-30T23:30:51Z",
"updated_at": "2015-09-30T23:30:51Z"
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": "b8b6a088-fb9f-4b75-ab3e-1dd5e2afa588",
"default_space_url": "/v2/spaces/b8b6a088-fb9f-4b75-ab3e-1dd5e2afa588",
"spaces_url": "/v2/users/uaa-id-307/spaces",
"organizations_url": "/v2/users/uaa-id-307/organizations",
"managed_organizations_url": "/v2/users/uaa-id-307/managed_organizations",
"billing_managed_organizations_url": "/v2/users/uaa-id-307/billing_managed_organizations",
"audited_organizations_url": "/v2/users/uaa-id-307/audited_organizations",
"managed_spaces_url": "/v2/users/uaa-id-307/managed_spaces",
"audited_spaces_url": "/v2/users/uaa-id-307/audited_spaces"
}
}
Headers