POST api/Privilege/AddRolesToPrivilege?privilegeId={privilegeId}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
privilegeId

globally unique identifier

Required

Body Parameters

Collection of RoleDTO
NameDescriptionTypeAdditional information
Id

integer

None.

Name

string

Required

Matching regular expression pattern: ([a-zA-Z]).{3,50}$|[\u0621-\u064A].{3,50}

String length: inclusive between 2 and 50

NameOther

string

Required

Matching regular expression pattern: ([a-zA-Z]).{3,18}$|[\u0621-\u064A].{3,18}

String length: inclusive between 2 and 50

Description

string

String length: inclusive between 0 and 225

DescriptionOther

string

String length: inclusive between 0 and 225

IsActive

boolean

None.

IsChecked

boolean

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "Id": 1,
    "Name": "sample string 2",
    "NameOther": "sample string 3",
    "Description": "sample string 4",
    "DescriptionOther": "sample string 5",
    "IsActive": true,
    "IsChecked": true
  },
  {
    "Id": 1,
    "Name": "sample string 2",
    "NameOther": "sample string 3",
    "Description": "sample string 4",
    "DescriptionOther": "sample string 5",
    "IsActive": true,
    "IsChecked": true
  }
]

application/xml, text/xml

Sample:
<ArrayOfRoleDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Components.UserManagement.DTO">
  <RoleDTO>
    <Description>sample string 4</Description>
    <DescriptionOther>sample string 5</DescriptionOther>
    <Id>1</Id>
    <IsActive>true</IsActive>
    <IsChecked>true</IsChecked>
    <Name>sample string 2</Name>
    <NameOther>sample string 3</NameOther>
  </RoleDTO>
  <RoleDTO>
    <Description>sample string 4</Description>
    <DescriptionOther>sample string 5</DescriptionOther>
    <Id>1</Id>
    <IsActive>true</IsActive>
    <IsChecked>true</IsChecked>
    <Name>sample string 2</Name>
    <NameOther>sample string 3</NameOther>
  </RoleDTO>
</ArrayOfRoleDTO>

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 'List`1'.

Response Information

Resource Description

ReturnResult
NameDescriptionTypeAdditional information
ResultCode

ReturnResultCode

None.

ResultMessage

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ResultCode": 1,
  "ResultMessage": "sample string 1"
}

application/xml, text/xml

Sample:
<ReturnResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Infrastructure">
  <ResultCode>NullOrEmptyUserId</ResultCode>
  <ResultMessage>sample string 1</ResultMessage>
</ReturnResult>