Memos

Update User

UpdateUser updates a user. Users may update themselves; admins may update anyone. Changing the password ends the user's other sessions.

PATCH
/api/users/{user}

Path Parameters

user*string

The user id.

Query Parameters

updateMask?string

Required. The fields to update. Supported paths: username, display_name, email, avatar_url, description, password, role, state. role and state require an admin.

Formatfield-mask
allowMissing?boolean

Optional. 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"}