文章 Update User REST 端点

URLs

PUT api/v1/users/{id}.xml (or .json)

UPDATE a user by user id.

PUT api/v1/users/{lookupusername}.xml (or .json)

UPDATE a user by username.

请求参数

名称

类型

描述

必需

默认值

选项

Id

int?

Either Id or Username is required.

Lookupusername

string

Either Id or Lookupusername is required.

Username

string

Required if changing the username.

User

RestUser

The submission of a complete user node is deprecated, will be removed and should not be used for new development. Instead supply user properties for the request properties (Bio, DisplayName, etc.).

OldPassword

string

Required if changing the password.

NewPassword

string

New Password

PrivateEmail

string

Private Email

DisplayName

string

Display Name

AllowSitePartnersToContact

bool?

Allow Site Partners To Contact

AllowSiteToContact

bool?

Allow Site To Contact

Bio

string

Bio

Birthday

DateTime?

Birthday

IsBirthdaySet

bool?

Is Birthday Set

ConversationContactType

string

Types of users who can start conversations with you. Options are: None, FriendsOnly, AllUsers.

DateFormat

string

Date Format

EditorType

string

Editor Type

EnableCommentNotifications

bool?

Enable Comment Notifications

EnableConversationNotifications

bool?

Enable Conversation Notifications

EnableDisplayInMemberList

bool?

Enable Display In Member List

EnableDisplayName

bool?

Enable Display Name

EnableEmoticons

bool?

Enable Emoticons

EnableFavoriteSharing

bool?

Enable Favorite Sharing

ReceiveEmails

bool?

Receive Emails

EnableHtmlEmail

bool?

Enable Html Email

EnableTracking

bool?

Enable Tracking

EnableUserSignatures

bool?

Enable User Signatures

Gender

Gender?

Gender

Language

string

Language

Location

string

Location

PublicEmail

string

Public Email

Signature

string

Signature

TimeZone

double?

Time Zone

TimeZoneId

string

Time Zone Id

WebUrl

string

Web Url

AccountStatus

string

Options are: ApprovalPending, Approved, Banned, Disapproved, All

ProfileFields

RestProfileFields

Profile Fields

ExtendedAttributes

RestExtendedAttributes

Extended Attributes

RssFeeds

string

A comma delimited list of RSS feeds

EnabledActivityMessageTypes

string

A comma delimited list of enabled activity message types

ModerationLevel

string

Options are: Unmoderated, Moderated