Updating a User
PUT /v2/users/:guid
Request
Route
PUT /v2/users/uaa-id-3
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": "a9371d52-f75d-4978-ac0b-e85ee40435e5"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/users/uaa-id-3" -d '{
"default_space_guid": "a9371d52-f75d-4978-ac0b-e85ee40435e5"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQiLCJlbWFpbCI6ImVtYWlsLTJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMzk4MTA5Nn0.BTNkEmddEYWxFruT_oRiIi9mMXz512DNeGnzQPCN044" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "uaa-id-3",
"url": "/v2/users/uaa-id-3",
"created_at": "2015-06-04T00:04:56Z",
"updated_at": "2015-06-04T00:04:56Z"
},
"entity": {
"admin": false,
"active": false,
"default_space_guid": "a9371d52-f75d-4978-ac0b-e85ee40435e5",
"default_space_url": "/v2/spaces/a9371d52-f75d-4978-ac0b-e85ee40435e5",
"spaces_url": "/v2/users/uaa-id-3/spaces",
"organizations_url": "/v2/users/uaa-id-3/organizations",
"managed_organizations_url": "/v2/users/uaa-id-3/managed_organizations",
"billing_managed_organizations_url": "/v2/users/uaa-id-3/billing_managed_organizations",
"audited_organizations_url": "/v2/users/uaa-id-3/audited_organizations",
"managed_spaces_url": "/v2/users/uaa-id-3/managed_spaces",
"audited_spaces_url": "/v2/users/uaa-id-3/audited_spaces"
}
}
Headers