POST api/role/add

角色保存成功

Request Information

URI Parameters

None.

Body Parameters

角色

Roles
NameDescriptionTypeAdditional information
RolesID

角色编号

integer

None.

RolesName

角色名称

string

None.

Remark

备注

string

None.

EstablishDate

创建时间

date

None.

Inlay

内置角色

boolean

None.

IsSystem

是否系统角色

boolean

None.

Pid

父级id

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "RolesID": 1,
  "RolesName": "sample string 2",
  "Remark": "sample string 3",
  "EstablishDate": "2024-09-25T00:10:10.702683+08:00",
  "Inlay": true,
  "IsSystem": true,
  "Pid": 7
}

text/html

Sample:
{"RolesID":1,"RolesName":"sample string 2","Remark":"sample string 3","EstablishDate":"2024-09-25T00:10:10.702683+08:00","Inlay":true,"IsSystem":true,"Pid":7}

application/xml, text/xml

Sample:
<Roles xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BJ.Data">
  <EstablishDate>2024-09-25T00:10:10.702683+08:00</EstablishDate>
  <Inlay>true</Inlay>
  <IsSystem>true</IsSystem>
  <Pid>7</Pid>
  <Remark>sample string 3</Remark>
  <RolesID>1</RolesID>
  <RolesName>sample string 2</RolesName>
</Roles>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

角色保存成功

JsonRtnDtoOfRoles
NameDescriptionTypeAdditional information
Msg

string

None.

State

RtnState

None.

Data

Roles

None.

Response Formats

application/json, text/json

Sample:
{
  "Msg": "sample string 1",
  "State": 100,
  "Data": {
    "RolesID": 1,
    "RolesName": "sample string 2",
    "Remark": "sample string 3",
    "EstablishDate": "2024-09-25T00:10:10.702683+08:00",
    "Inlay": true,
    "IsSystem": true,
    "Pid": 7
  }
}

text/html

Sample:
{"Msg":"sample string 1","State":100,"Data":{"RolesID":1,"RolesName":"sample string 2","Remark":"sample string 3","EstablishDate":"2024-09-25T00:10:10.702683+08:00","Inlay":true,"IsSystem":true,"Pid":7}}

application/xml, text/xml

Sample:
<JsonRtnDtoOfRolesmEDjlcEG xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BJ.Services">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/BJ.Data">
    <d2p1:EstablishDate>2024-09-25T00:10:10.702683+08:00</d2p1:EstablishDate>
    <d2p1:Inlay>true</d2p1:Inlay>
    <d2p1:IsSystem>true</d2p1:IsSystem>
    <d2p1:Pid>7</d2p1:Pid>
    <d2p1:Remark>sample string 3</d2p1:Remark>
    <d2p1:RolesID>1</d2p1:RolesID>
    <d2p1:RolesName>sample string 2</d2p1:RolesName>
  </Data>
  <Msg>sample string 1</Msg>
  <State>Display</State>
</JsonRtnDtoOfRolesmEDjlcEG>

text/javascript, application/javascript, application/json-p

Sample:
/**/ typeof  === 'function' && ({"Msg":"sample string 1","State":100,"Data":{"RolesID":1,"RolesName":"sample string 2","Remark":"sample string 3","EstablishDate":"2024-09-25T00:10:10.702683+08:00","Inlay":true,"IsSystem":true,"Pid":7}});