Skip to main content
Version: Current

Job.GetJobInfoAsync

Description​

Gets the Job information with the specified Id from the connected AI Command Center.

Signature [C#]​

Task<JobInfo> GetJobInfoAsync(int jobId)

Properties​

Input​

PropertyDescription
jobIdSpecify the Id of the Job whose information has to be retrieved.

Output​

PropertyDescription
Task<JobInfo>Returns the information of a job.

Remarks​

Use GetJobInfoAsync API to get the information about the specified Job id from the connected AI Command Center.

Example​

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

int jobId = 1;

JobInfo jobInfo = Task.Run(() => context.Jobs.GetJobInfoAsync(jobId)).Result;

Console.WriteLine("JobId: " + jobInfo.JobId + ", Job execution status: " + jobInfo.ExecStatus);
}
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;
}