PATCH
/api/v1/spaces/{space}/members/{member}Update a space member
Updates a member's role in a space. Supply the member resource in the body and use updateMask to select the supported role field for the update.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
spacestringrequired
The identifier of the space containing the membership.
memberstringrequired
The identifier of the membership to update.
updateMaskstringoptional
The field mask selecting the field to update; only `role` is supported.
The space member resource with the user and role values.
namestringoptional
The resource name. Format: spaces/{space}/members/{username}.
userstringrequired
Required. The member user. Format: users/{username}.
rolestringrequired
Required. The member's role within this space.
200Returns the updated space membership, including its resource name, user, and role.
namestringoptional
The resource name. Format: spaces/{space}/members/{username}.
userstringrequired
Required. The member user. Format: users/{username}.
rolestringrequired
Required. The member's role within this space.
defaultDefault error response
codeintegeroptional
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
messagestringoptional
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
detailsarray<object>optional
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Error handling
The space path parameter must identify the space, and the member path parameter must identify a membership in that space. The request body requires user in the format users/{username} and role, which must be one of ROLE_UNSPECIFIED, ADMIN, or USER. Set updateMask to role; no other update mask field is supported.
