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
Property | Description |
---|---|
botId | Specify the AssistantBuddy Id to retrieve log information. |
skip | Specify the number of log details in a sequence to be skipped, by returning the remaining log details. |
take | 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 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;
}