Skip to main content

Roles.UpdateRoleAsync

Description

Update the existing role with specified NewRoleInfo from the connected Control Room

Signature [C#]

Task UpdateRoleAsync(NewRoleInfo roleInfo)

Properties

Input

PropertyDescription
NewRoleInfoSpecify update details of a Role.

Remarks

Use UpdateRoleAsync API to update role with specified NewRoleInfo from the connected Control Room.

Example

C#
public void UpdateRole()
{
IControlRoomContext context = LoginControlRoom();

string updateRoleName = "updateRole";

NewRoleInfo newRoleInfo = new NewRoleInfo()
{
RoleId = 5,
RoleName = updateRoleName
};
Task.Run(() => context.Roles.UpdateRoleAsync(newRoleInfo)).Wait();
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}