POST api/UserManagement/CreateRole

Create new user role with permissions

Request Information

URI Parameters

None.

Body Parameters

role object

Role
NameDescriptionTypeAdditional information
RoleId

integer

None.

Name

string

None.

IsDefault

boolean

None.

Permissions

Collection of Permissions

None.

Request Formats

application/json, text/json

Sample:
{
  "RoleId": 1,
  "Name": "sample string 2",
  "IsDefault": true,
  "Permissions": [
    1,
    1
  ]
}

application/xml, text/xml

Sample:
<Role xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/enTT.ZS.Dto.User">
  <IsDefault>true</IsDefault>
  <Name>sample string 2</Name>
  <OrganizationId>3</OrganizationId>
  <Permissions xmlns:d2p1="http://schemas.datacontract.org/2004/07/enTT.ZS.Enums.User">
    <d2p1:Permissions>CreateWorkflow</d2p1:Permissions>
    <d2p1:Permissions>CreateWorkflow</d2p1:Permissions>
  </Permissions>
  <RoleId>1</RoleId>
</Role>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ResponseOfRole
NameDescriptionTypeAdditional information
StatusCode

StatusCode

None.

Message

string

None.

Data

Role

None.

Response Formats

application/json, text/json

Sample:
{
  "StatusCode": 1000,
  "Message": "sample string 1",
  "Data": {
    "RoleId": 1,
    "Name": "sample string 2",
    "IsDefault": true,
    "Permissions": [
      1,
      1
    ]
  }
}

application/xml, text/xml

Sample:
<ResponseOfRolekvwhp91_P xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/enTT.ZS.Dto">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/enTT.ZS.Dto.User">
    <d2p1:IsDefault>true</d2p1:IsDefault>
    <d2p1:Name>sample string 2</d2p1:Name>
    <d2p1:OrganizationId>3</d2p1:OrganizationId>
    <d2p1:Permissions xmlns:d3p1="http://schemas.datacontract.org/2004/07/enTT.ZS.Enums.User">
      <d3p1:Permissions>CreateWorkflow</d3p1:Permissions>
      <d3p1:Permissions>CreateWorkflow</d3p1:Permissions>
    </d2p1:Permissions>
    <d2p1:RoleId>1</d2p1:RoleId>
  </Data>
  <Message>sample string 1</Message>
  <Result />
  <StatusCode>Success</StatusCode>
</ResponseOfRolekvwhp91_P>