1.6 Get Jobs

By the method GetJobs you can retrieve the list of Jobs from Monitoring task.
/// WsMonitoring.GetJobs Method (c# .NET)
public static string GetJobs(WsMonitoringClient client)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
 // call method GetJobs 
 // obtaining a WsResultOfArrayOfMonitoringJobEntity item
 WsResultOfArrayOfMonitoringJobEntity result =
     client.GetJobs();

 // if the call is Success print returned values
 if (result.Success)
 {
     stringBuilder.Append("Operation ends successfully\n");

     // get Value returned from server
     MonitoringJobEntity[] items = result.Value;

     // for each item print the information
     foreach (MonitoringJobEntity item in items)
     {
  stringBuilder.Append("\nJobID: ");
  stringBuilder.Append(item.JobID);
  stringBuilder.Append("\nJobstatus: ");
  stringBuilder.Append(item.Jobstatus);
     }
 }
 else
 {
     throw new ApplicationException(result.ResultMessage);
 }
    }
    catch (Exception ex)
    {
 // re-run the error
 throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
/// WsMonitoring.GetJobs Method (JAVA)
public static String GetJobs(IWsMonitoring client) 
{
    //specify the account login details 
    ((BindingProvider) client).getRequestContext()
 .put(BindingProvider.USERNAME_PROPERTY, "ARU-0000");
    ((BindingProvider) client).getRequestContext()
 .put(BindingProvider.PASSWORD_PROPERTY, "0123456789");

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        // call method GetMonitoringIPAddress 
        // obtaining a WsResultOfArrayOfMonitoringIPAddressEntity item
        WsResultOfArrayOfMonitoringJobEntity result = client.getJobs();

        //if the call is Success print values
        if (result.isSuccess()) 
 {
     ArrayOfMonitoringJobEntity items = result.getValue(); 
     List monitoringJobEntity = 
  items.getMonitoringJobEntity();
 
     for (Iterator it = 
  monitoringJobEntity.iterator(); it.hasNext();)
     {
         MonitoringJobEntity item = it.next();
         stringBuilder.append("\nJobID: ");
         stringBuilder.append(item.getJobID());
         stringBuilder.append("\nJobstatus: ");
         stringBuilder.append(item.getJobstatus());
            }
        } 
 else 
 {
     throw new Exception(result.getResultMessage());
        }
    } 
    catch (Exception ex) 
    {
        System.out.println(ex);
    }

    return stringBuilder.toString();
}
Version
API: v2.8 URL:https://api.services.cloud.it/wsMonitoring/v2.8/wsMonitoring.svc?wsdl

See also