文章 List User REST 端点

URLs

GET api/v1/roles/{roleid}/users.xml (or .json)

LIST users in a Role.

GET api/v1/users.xml (or .json)

LIST all users.

请求参数

名称

类型

描述

必需

默认值

选项

JoinDate

DateTime?

Used to limit to just users who have joined since the specified date.

Usernames

string

Used to limit to a specific set of users.

ContentIds

string

Comma separated list of ContentIds. Used to limit to a specific set of users as well as sort order if SoryBy is set to ContentIdsOrder

EmailAddress

string

Used to limit to a specific user based on email address.

RoleId

int?

Used to get a list of users for a role.

AccountStatus

string

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

IncludeHidden

bool

By default "hidden" users (like service accounts) will not be returned. Set IncludeHidden=true to return all users.

LastUpdatedUtcDate

DateTime?

Allows filtering by last updated date to get say the users updated in last 10 hours

SortBy

string

Options are: JoinedDate, Username, Website, Posts, Email, RecentPosts, DisplayName, ContentIdsOrder

SortOrder

string

Default for Score is Descending, otherwise Ascending.

PageSize

int?

Specify the number of results to return per page. If not set the default is 20. The max is 100.

PageIndex

int?

Specify the page number of paged results to return. Zero-based index. If not specified the default is 0.