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
Property | Description |
---|---|
Id | Specify the Id of the email trigger to change the toggle status. |
Disable | Specifies 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;
}