Skip to main content
Version: Current

Logs.GetABLogsByBotId

Description​

The API gets the list of all job logs of Assistant Buddy with the specified Id from the connected AI Command Center.

Signature [C#]​

Task<List<LogData>> GetABLogsByBotId(int botId, int skip, int take);

Properties​

Input​

ParameterTypeRequired / defaultDescription
botIdintRequiredSpecify the AssistantBuddy Id to retrieve log information.
skipintRequiredSpecify the number of log details in a sequence to be skipped, by returning the remaining log details.
takeintRequiredSpecify the number of contiguous log details from the start of a sequence.

Output​

PropertyDescription
Task<List<LogData>>Returns log details of jobs from the specified AssistantBuddy.

Remarks​

Use GetABLogsByBotId API to get the list of log details of all jobs with the specified AssistantBuddy id and pagination (skip and take) parameters from the connected AI Command Center.

Example​

C#
public async Task GetABLogsByBotId()
{
IControlRoomContext context = LoginControlRoom();
try
{
int assistantBuddyId = 1;
var logs = await context.Logs.GetABLogsByBotId(assistantBuddyId, 0, 0);
foreach (LogData logData in logs)
Console.WriteLine(logData.Message);
}
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.