Logs.DeleteLogsByJobId
Description
Deletes the logs for specified job id from the connected AI Command Center
Signature [C#]
Task<bool> DeleteLogsByJobId(int jobId);
Properties
Input
| Parameter | Type | Required / default | Description |
|---|---|---|---|
jobId | int | Required | Specify the Job Id to delete the log. |
Output
| Property | Description |
|---|---|
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 AI Command Center.
Example
C#
public async Task DeleteLogByJobId()
{
IControlRoomContext context = LoginControlRoom();
try
{
int jobId = 1;
bool message = await context.Logs.DeleteLogsByJobId(jobId);
}
finally
{
context.Close();
}
}
Connection helper
public IControlRoomContext LoginControlRoom()
{
string RequiredSetting(string name) => Environment.GetEnvironmentVariable(name) ?? throw new InvalidOperationException($"Set {name} before running this example.");
string serverUrl = RequiredSetting("INTELLIBUDDIES_SERVER_URL");
string userName = RequiredSetting("INTELLIBUDDIES_USERNAME");
string password = RequiredSetting("INTELLIBUDDIES_PASSWORD");
string connectionString = $"ServerUrl={serverUrl};UserName={userName};Password={password}";
IControlRoomContext context = new ControlRoomContext(connectionString);
context.Open();
return context;
}
See Get started for namespaces, configuration, and context cleanup, and SDK usage for error handling.