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
| Parameter | Type | Required / default | Description |
|---|---|---|---|
botId | int | Required | Specify the AssistantBuddy Id to retrieve log information. |
skip | int | Required | Specify the number of log details in a sequence to be skipped, by returning the remaining log details. |
take | int | Required | Specify the number of contiguous log details from the start of a sequence. |
Output
| Property | Description |
|---|---|
| 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.