setUser

abstract fun setUser(userId: String, classVersion: Int, status: String? = null, payload: Any? = null, ifMatch: String? = null): SetUser

Replaces a user in full.

Every mutable field is overwritten. Omitting status or payload clears the stored value rather than preserving it, so a read-modify-write must send back every field it wants to keep. Use updateUser to change part of a user.

Parameters

userId

Identifier of the user to replace.

classVersion

Version of the class the payload conforms to.

status

Optional status to store with the user.

payload

Optional replacement user fields (arbitrary JSON object).

ifMatch

Optional eTag last read, to fail the request when the user changed since (If-Match header).