POST api/Roles/SaveRole
Request Information
URI Parameters
None.
Body Parameters
RolesDtoName | Description | Type | Additional information |
---|---|---|---|
UserId | integer |
None. |
|
DistrictKey | Collection of string |
None. |
|
RolesList | Collection of UserRole |
None. |
Request Formats
application/json, text/json
Sample:
{ "UserId": 1, "DistrictKey": [ "sample string 1", "sample string 2" ], "RolesList": [ { "Id": 1, "UserId": 1, "RoleId": 1, "DistrictKey": "sample string 2", "CanView": true, "CanAdd": true, "CanEdit": true, "CanDelete": true, "CanPrint": true, "MaxRights": 1 }, { "Id": 1, "UserId": 1, "RoleId": 1, "DistrictKey": "sample string 2", "CanView": true, "CanAdd": true, "CanEdit": true, "CanDelete": true, "CanPrint": true, "MaxRights": 1 } ] }
application/xml, text/xml
Sample:
<RolesDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FactoryInspection.Repository.DTO"> <DistrictKey xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </DistrictKey> <RolesList xmlns:d2p1="http://schemas.datacontract.org/2004/07/FactoryInspection.Repository.Entities"> <d2p1:UserRole> <d2p1:CanAdd>true</d2p1:CanAdd> <d2p1:CanDelete>true</d2p1:CanDelete> <d2p1:CanEdit>true</d2p1:CanEdit> <d2p1:CanPrint>true</d2p1:CanPrint> <d2p1:CanView>true</d2p1:CanView> <d2p1:DistrictKey>sample string 2</d2p1:DistrictKey> <d2p1:Id>1</d2p1:Id> <d2p1:MaxRights>1</d2p1:MaxRights> <d2p1:RoleId>1</d2p1:RoleId> <d2p1:UserId>1</d2p1:UserId> </d2p1:UserRole> <d2p1:UserRole> <d2p1:CanAdd>true</d2p1:CanAdd> <d2p1:CanDelete>true</d2p1:CanDelete> <d2p1:CanEdit>true</d2p1:CanEdit> <d2p1:CanPrint>true</d2p1:CanPrint> <d2p1:CanView>true</d2p1:CanView> <d2p1:DistrictKey>sample string 2</d2p1:DistrictKey> <d2p1:Id>1</d2p1:Id> <d2p1:MaxRights>1</d2p1:MaxRights> <d2p1:RoleId>1</d2p1:RoleId> <d2p1:UserId>1</d2p1:UserId> </d2p1:UserRole> </RolesList> <UserId>1</UserId> </RolesDto>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
HttpResponseMessageName | Description | Type | Additional information |
---|---|---|---|
Version | Version |
None. |
|
Content | HttpContent |
None. |
|
StatusCode | HttpStatusCode |
None. |
|
ReasonPhrase | string |
None. |
|
Headers | Collection of Object |
None. |
|
RequestMessage | HttpRequestMessage |
None. |
|
IsSuccessStatusCode | boolean |
None. |