Method UpdateRole
UpdateRole(String, RoleContract)
Update a role
Declaration
void UpdateRole(string connectionId, RoleContract role)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
RoleContract | role | The role to update |
Examples
POST http://YourServerName/InfoShare/Json/Common/UpdateRole
Example for update a role.{
"connectionId": "b6742bb8-ef97-44ae-819b-a2fa2200908a",
"role": {
"Id": "06ea644d-67e0-e911-a94a-00155d290a08",
"Name": "DemoRoleNEW",
"UserIds": ["0100a003-38a7-11d8-a902-0050bf427e8f","172935af-62e0-e911-a94a-00155d290a08"],
"GroupIds": [],
"AllowedActionIds": ["01002040-38a7-11d8-a902-0050bf427e8f","01002042-38a7-11d8-a902-0050bf427e8f",
"01002006-38a7-11d8-a902-0050bf427e8f","0100206c-38a7-11d8-a902-0050bf427e8f" ....] }
}
Response:
{ }
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | Role not found {roleId} (10046) |
ServiceException | Name is not unique: {name} (10067) |
ServiceException | The administrative context {administrativeContext} is already checked out by user {displayLoginName} (10129) |
ServiceException | Only DCIAdmin is allowed to set the access operation {accessOperation} (10133) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |
ServiceException | Operation {operationName} not allowed. Missing AccessOperationId {operationId}. (10114) |
ServiceException | Not enough rights ({accessOperationName}, {accessOperationId}) (10071) |
ServiceException | ExternalUser must not be assigned to a role {0} (10373) |
ServiceException | Deleted user {userName} must be not assigned to role {roleName} (10382) |