Skip to main content

Roles.DeleteRoleAsync

Description

The API deletes an existing Role with a specified role ID from the connected Control Room.

Signature [C#]

Task DeleteRoleAsync(int roleId)

Properties

Input

PropertyDescription
roleIdSpecify the ID to delete a Role.

Remarks

Use DeleteRoleAsync API to delete a Role from the connected Control Room.

Example

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

int roleId = 5;

Task.Run(() => context.Roles.DeleteRoleAsync(roleId)).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;
}