Skip to main content

Job.DeleteJobAsync

Description

The API deletes an existing Job from the connected Control Room.

Signature [C#]

Task DeleteJobAsync(int jobId)

Properties

Input

PropertyDescription
jobIdThe Job Id to deleted

Remarks

Use DeleteJobAsync API to delete a Job from the connected Control Room.

Example

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

int jobId = 10;

Task.Run(() => context.Jobs.DeleteJobAsync(jobId)).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;
}