Skip to main content
Version: IB7.0

Logs.GetABLogsByBotId

Description​

The API gets the list of all job logs of Assistant Buddy with the specified Id from the connected Control Room.

Signature [C#]​

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

Properties​

Input​

PropertyDescription
botIdSpecify the AssistantBuddy Id to retrieve log information.
skipSpecify the number of log details in a sequence to be skipped, by returning the remaining log details.
takeSpecify 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 Control Room.

Example​

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

int assistantBuddyId = 1;

var logs = Task.Run(() => context.Logs.GetABLogsByBotId(assistantBuddyId, 0, 0)).Result;
foreach (LogData logData in logs)
Console.WriteLine(logData.Message);
}
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;
}