Update User
UpdateUser updates a user. Users may update themselves; admins may update anyone. Changing the password ends the user's other sessions.
Path Parameters
The user id.
Query Parameters
Required. The fields to update. Supported paths: username, display_name, email, avatar_url, description, password, role, state. role and state require an admin.
field-maskOptional. Currently ignored; updating a missing user fails with NOT_FOUND.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
User is an account on the instance.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/api/users/string" \ -H "Content-Type: application/json" \ -d '{ "username": "string", "role": "ROLE_UNSPECIFIED", "state": "STATE_UNSPECIFIED" }'{ "name": "string", "username": "string", "displayName": "string", "email": "string", "avatarUrl": "string", "description": "string", "password": "string", "role": "ROLE_UNSPECIFIED", "state": "STATE_UNSPECIFIED", "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z"}