文章 List Role REST 端点

URLs

GET api/v1/{application}/{id}/roles.xml (or .json)

LIST roles for an application.

GET api/v1/{application}/{id}/roles/permissions.xml (or .json)

LIST roles with permissions for an application.

GET api/v1/{application}/{id}/roles/permissions/{permissionid}.xml (or .json)

LIST roles with permission for an application.

GET api/v1/{application}/{id}/roles/permissions/user/{userid}.xml (or .json)

LIST roles with permissions for a user by user id for an application.

GET api/v1/{application}/{id}/roles/permissions/user/{username}.xml (or .json)

LIST roles with permissions for a user by username for an application.

GET api/v1/{application}/{id}/roles/user/{userid}.xml (or .json)

LIST roles for a user by user id for an application.

GET api/v1/{application}/{id}/roles/user/{username}.xml (or .json)

LIST roles for a user by username for an application.

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

LIST all roles.

GET api/v1/roles/permissions.xml (or .json)

LIST all roles with permissions.

GET api/v1/roles/permissions/{permissionid}.xml (or .json)

LIST roles with permission.

GET api/v1/roles/permissions/user/{userid}.xml (or .json)

LIST roles with permissions for a user by user id.

GET api/v1/roles/permissions/user/{username}.xml (or .json)

LIST roles with permissions for a user by username.

GET api/v1/roles/user/{userid}.xml (or .json)

LIST roles for a user by user id.

GET api/v1/roles/user/{username}.xml (or .json)

LIST roles for a user by username.

请求参数

名称

类型

描述

必需

默认值

选项

Application

string

Application

Id

int?

Id

UserId

int?

Either UserId or Username are required when using include=user

Username

string

Either UserId or Username are required when using include=user

IncludePermissions

bool

Include Permissions

PermissionId

string

Permission Id

Include

string

Options for include are user, granted, or denied. Ex: include=granted.

IncludeWithAvatarOnly

bool

Will only return roles that have avatars. For use with include=user only.

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.