文章 List Group REST 端点

URLs

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

LIST groups.

GET api/v1/groups/{parentgroupid}/groups.xml (or .json)

LIST sub-groups for a group.

GET api/v1/users/{userid}/groups.xml (or .json)

LIST groups for which the user is any type of member by user id.

GET api/v1/users/{username}/groups.xml (or .json)

LIST groups for which the user is any type of member by username.

请求参数

名称

类型

描述

必需

默认值

选项

UserId

int?

User Id

Username

string

Username

IncludePendingMemberships

bool?

When getting groups for a user, include groups where user has PendingMembership

ParentGroupId

int?

Setting a Parent Group Id returns just the child groups for the group.

IncludeAllSubGroups

bool?

Used when getting child groups, will return all subgroups recursively.

GroupTypes

string

Values include: Joinless, PublicOpen, PublicClosed, PrivateUnlisted, PrivateListed, or All.

GroupNameFilter

string

Used to filter results by matching group name.

ContainerIds

string

Comma separated list of ContainerIds. Used to limit to a specific set of groups as well as sort order if SoryBy is set to ContainerIdsOrder

Permission

string

Used to only get groups where the specified permission is valid.

SortBy

string

Options include Name, SortOrder, LastUpdate, ContainerIdsOrder. Default is Name.

SortOrder

string

Options include Ascending, Descending. Default is 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.