Skip to main content

EmailTrigger.ChangeEmailTriggerToggleStatus

Description

Toggle the status between Enable and Disable for the specified Email Trigger.

Signature [C#]

Task ChangeEmailTriggerToggleStatus(int Id, bool Disable)

Properties

Input

PropertyDescription
IdSpecify the Id of the email trigger to change the toggle status.
DisableSpecifies the toggle value.

Remarks

Use ChangeEmailTriggerToggleStatus API to change the toggle status of the email trigger inside the connected Control Room.

Example

C#
public void ChangeEmailTriggerToggleStatus()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
int triggerId = 1;
bool isDisabled = true;

Task.Run(() => context.EmailTriggers.ChangeEmailTriggerToggleStatus(triggerId, isDisabled)).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;
}