POST Api/Role/Add

Request Information

URI Parameters

None.

Body Parameters

RoleDto
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

Name

string

None.

Remark

string

None.

CreateTime

date

None.

IsDeleted

boolean

None.

IsEnable

boolean

None.

MenuList

Collection of globally unique identifier

None.

PageIndex

integer

None.

PageSize

integer

None.

Total

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "14594ebb-8030-481a-84cb-183ce818939f",
  "Name": "sample string 2",
  "Remark": "sample string 3",
  "CreateTime": "2026-03-02T19:51:08.6030388+08:00",
  "IsDeleted": true,
  "IsEnable": true,
  "MenuList": [
    "517a3e25-aa83-458d-8357-40df25a41ec8",
    "33065650-1970-45bf-8ddd-0042ef39f373"
  ],
  "PageIndex": 4,
  "PageSize": 5,
  "Total": 6
}

application/xml, text/xml

Sample:
<RoleDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ZShOil.Model">
  <_x003C_PageIndex_x003E_k__BackingField>4</_x003C_PageIndex_x003E_k__BackingField>
  <_x003C_PageSize_x003E_k__BackingField>5</_x003C_PageSize_x003E_k__BackingField>
  <_x003C_Total_x003E_k__BackingField>6</_x003C_Total_x003E_k__BackingField>
  <CreateTime>2026-03-02T19:51:08.6030388+08:00</CreateTime>
  <Id>14594ebb-8030-481a-84cb-183ce818939f</Id>
  <IsDeleted>true</IsDeleted>
  <IsEnable>true</IsEnable>
  <MenuList xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:guid>517a3e25-aa83-458d-8357-40df25a41ec8</d2p1:guid>
    <d2p1:guid>33065650-1970-45bf-8ddd-0042ef39f373</d2p1:guid>
  </MenuList>
  <Name>sample string 2</Name>
  <Remark>sample string 3</Remark>
</RoleDto>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.