文章 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.

否