文章 Create Role REST 端点

URLs

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

CREATE a role.

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

CREATE Add a user to a role.

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

CREATE a user to a role.

请求参数

名称

类型

描述

必需

默认值

选项

Name

string

Name

Description

string

Description

GroupId

int?

Group Id

UserId

int?

Either UserId or Username is required when using include=user

Username

string

Either UserId or Username is required when using include=user

RoleId

int?

Either RoleId or RoleName is required when using include=user

RoleName

string

Either RoleId or RoleName is required when using include=user

Include

string

Options for include are: user. Ex: include=user.