Skip to main content

Logs.DeleteLogsByJobId

Description

Deletes the logs for specified job id from the connected Control Room

Signature [C#]

Task<bool> DeleteLogsByJobId(int jobId)

Properties

Input

PropertyDescription
jobIdSpecify the Job Id to delete the log.

Output

PropertyDescription
Task<bool>The boolean value (true for successful deletion) returned indicates whether the job log delete status.

Remarks

Use DeleteLogsByJobId API to delete the job logs of specified job Id from the connected Control Room.

Example

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

int jobId = 1;

bool message = Task.Run(() => context.Logs.DeleteLogsByJobId(jobId)).Result;
}
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;
}