POST api/Admin/User/{username}/Role/{roleId}/MasterEntityType/{masterEntityTypeId}/MasterEntityId/{masterEntityId}/ByProject/{byProject}
Assign permissions by master entity type, parent type, user and role
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| username |
application username |
string |
Required |
| roleId |
role id |
integer |
Required |
| masterEntityTypeId |
master entity type id |
integer |
Required |
| masterEntityId |
master entity id |
integer |
Required |
| byProject |
if call is from project |
boolean |
Required |
Body Parameters
UserRoleValidityDto| Name | Description | Type | Additional information |
|---|---|---|---|
| ValidityStartDate | date |
None. |
|
| ValidityFinishDate | date |
None. |
Request Formats
application/json, text/json
Sample:
{
"validityStartDate": "2026-05-09T14:05:03.8661091+02:00",
"validityFinishDate": "2026-05-09T14:05:03.8661091+02:00"
}
text/html
Sample:
{"validityStartDate":"2026-05-09T14:05:03.8661091+02:00","validityFinishDate":"2026-05-09T14:05:03.8661091+02:00"}
application/xml, text/xml
Sample:
<UserRoleValidityDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TR.eSAM.IdentityModule.Application.Dtos.Dtos.ApplicationRoleAgg"> <ValidityFinishDate>2026-05-09T14:05:03.8661091+02:00</ValidityFinishDate> <ValidityStartDate>2026-05-09T14:05:03.8661091+02:00</ValidityStartDate> </UserRoleValidityDto>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
booleanResponse Formats
application/json, text/json, text/html
Sample:
true
application/xml, text/xml
Sample:
<boolean xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</boolean>