Skip to main content
Version: Current

Job.GetJobStatusAsync

Description​

The API gets the job status with a specified Id from the connected AI Command Center.

Signature [C#]​

Task<string> GetJobStatusAsync(int jobId);

Properties​

Input​

ParameterTypeRequired / defaultDescription
jobIdintRequiredSpecify the Id of the Job whose status has to be retrieved.

Output​

PropertyDescription
Task<string>Returns the status of the job.

Remarks​

Use GetJobStatusAsync API to get the status of the specified job Id from the connected AI Command Center.

Example​

C#
public async Task GetJobStatus()
{
IControlRoomContext context = LoginControlRoom();
try
{
int jobId = 1;
string jobStatus = await context.Jobs.GetJobStatusAsync(jobId);
Console.WriteLine("Job status: " + jobStatus);
}
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.