POST api/Backstage/EditRole

新增/编辑 角色

Request Information

URI Parameters

None.

Body Parameters

AddRole_request
NameDescriptionTypeAdditional information
PageSize

每页多少数据

integer

None.

PageIndex

当前第几页

integer

None.

Rid

角色id (新增传0)

integer

None.

RoleName

角色名称

string

None.

Remark

备注

string

None.

Active

是否启用

integer

None.

RType

1后台角色 2前台角色

integer

None.

PermissionUserList

Collection of Permission_Users

None.

Request Formats

application/json, text/json

Sample:
{
  "PageSize": 1,
  "PageIndex": 2,
  "Rid": 3,
  "RoleName": "sample string 4",
  "Remark": "sample string 5",
  "Active": 6,
  "RType": 7,
  "PermissionUserList": [
    {
      "UserId": 1,
      "UserName": "sample string 2"
    },
    {
      "UserId": 1,
      "UserName": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<AddRole_request xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Models.Request">
  <Active>6</Active>
  <PageIndex>2</PageIndex>
  <PageSize>1</PageSize>
  <PermissionUserList>
    <Permission_Users>
      <UserId>1</UserId>
      <UserName>sample string 2</UserName>
    </Permission_Users>
    <Permission_Users>
      <UserId>1</UserId>
      <UserName>sample string 2</UserName>
    </Permission_Users>
  </PermissionUserList>
  <RType>7</RType>
  <Remark>sample string 5</Remark>
  <Rid>3</Rid>
  <RoleName>sample string 4</RoleName>
</AddRole_request>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AddRole_request'.

Response Information

Resource Description

新增/编辑 角色

Result
NameDescriptionTypeAdditional information
code

错误代码

integer

None.

success

是否成功

boolean

None.

data

返回数据

Object

None.

msg

返回信息

string

None.

Response Formats

application/json, text/json

Sample:
{
  "code": 1,
  "success": true,
  "data": {},
  "msg": "sample string 4"
}

application/xml, text/xml

Sample:
<Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Models.BaseEntity">
  <code>1</code>
  <data />
  <msg>sample string 4</msg>
  <success>true</success>
</Result>