Skip to main content

Tasks.DeleteTaskAsync

Description

Deletes an existing Task with a specified Task ID from the connected Control Room

Signature [C#]

Task DeleteTaskAsync(int taskId)

Properties

Input

PropertyDescription
taskIdSpecify the taskId to delete.

Remarks

Use DeleteTaskAsync API to delete a Task with a specified task ID from the connected Control Room.

Example

C#
public void DeleteTask()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");

int taskId = 1;

Task.Run(() => context.Tasks.DeleteTaskAsync(taskId)).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;
}