1.4 Queue of Processes

Using the WsEndUser GetJobs method you can get a list of Job class objects representing operations which are currently Running and Waiting and that they will operate on the datacenter's various resources.

Here is an example that retrieves the list of processes for each server associated with the user
//IWsEndUser.GetJobs Method (c# .NET)
private static String GetJobs(WsEndUserClient client)
{
    String lastJob = String.Empty;

    try
    {
        //calls the GetJobs method, 
        //getting a WsResultOfArrayOfJob object  
        WsResultOfArrayOfJob result = client.GetJobs();
        if (result.Success)
        {
            StringBuilder sb = new StringBuilder();
            Job[] jobs = result.Value.OrderByDescending(p => p.CreationDate).ToArray();
            foreach (Job job in jobs)
            {
                sb.AppendLine(" Server name" + job.ServerName);
                sb.AppendLine(" Creation date" + job.CreationDate.ToString());
                sb.AppendLine(" Id: " + job.JobId.ToString());
                sb.AppendLine(" Progress: " + job.Progress.ToString());
            }
            lastJob = sb.ToString();
        }
    }
    catch (Exception ex)
    {
        //relaunches the error 
        throw new ApplicationException(ex.Message);
    }

    return lastJob;
}
//IWsEndUser.getJobs Method (JAVA)
private static String GetJobs(IWsEndUser client)
{
    String lastJob = "";

    try
    {
        //calls the getJobs method, 
        //getting a WsResultOfArrayOfJob object 
        WsResultOfArrayOfJob result = client.getJobs();
        if (result.isSuccess())
        {
            StringBuilder sb = new StringBuilder();
            List jobs = result.getValue().getJob();
            for (Job job : jobs)
            {
                sb.append(" Server name: ").append(job.getServerName());
                sb.append(" Creation date: ").append(job.getCreationDate().toString());
                sb.append(" Id: ").append(job.getJobId().toString());
                sb.append(" Progress: ").append(job.getProgress().toString());
            }
            lastJob = sb.toString();
        }
    }
    catch (Exception ex)
    {
        //prints the error 
        System.out.println(ex);
    }

    return lastJob;
}

By calling the GetServerDetails method you can also get the list of active Jobs for the specified server.

//IWsEndUser.GetServerDetails Method (c# .NET)
public static String GetServerDetails(WsEndUserClient client, int serverId)
{
    StringBuilder sb = new StringBuilder();

    try
    {
        //calls the GetServerDetails method,
        //getting a WsResultOfServerDetails object 
        WsResultOfServerDetails result = client.GetServerDetails(serverId);

        //if the call fails; it relaunches the error indicating the message 
        if (result.Success)
        {
            sb.AppendLine("SERVER DETAIL:");

            //the values returned are stored into the ServerDetails object
            ServerDetails details = result.Value;

            sb.AppendLine("Creation date: " + details.CreationDate);
            sb.AppendLine("Status: " + details.ServerStatus);
            sb.AppendLine("Number of CPU: " + details.CPUQuantity);
            sb.AppendLine("RAM quantity: " + details.RAMQuantity.Quantity);
            sb.AppendLine("Type of hypervisor: " + details.HypervisorType);

            sb.AppendLine("Network adapters");
            foreach (NetworkAdapter na in details.NetworkAdapters)
            {
                sb.AppendLine("\t id: " + na.Id);
                sb.AppendLine("\t\t Mac address: " + na.MacAddress);
                sb.AppendLine("\t\t IP addresses: ");
                        
                foreach (IPAddress ip in na.IPAddresses)
                {
                    sb.AppendLine("\t\t\t " + ip.Value);
                }
                sb.AppendLine("\t\t type: " + na.NetworkAdapterType);
                if (na.VLan != null)
                    sb.AppendLine("\t\t VLan name: " + na.VLan.Name);
            }
            sb.AppendLine("Note: " + details.Note);
            sb.AppendLine("OS Template: " + details.OSTemplate.Name);
            sb.AppendLine("Virtual Disks: ");
            foreach (VirtualDisk vd in details.VirtualDisks.ToList())
            {
                sb.AppendLine("\t id: " + vd.ProductId);
                sb.AppendLine("\t\t size: " + vd.Size);
                sb.AppendLine("\t\t type: " + vd.ResourceType);
            }
            sb.AppendLine("Number of active jobs: " + details.ActiveJobs.Count());
            foreach (Job job in details.ActiveJobs)
            {
                sb.AppendLine(" Creation date: " + job.CreationDate.ToString());
                sb.AppendLine(" Id: " + job.JobId.ToString());
                sb.AppendLine(" Progress: " + job.Progress.ToString());
            }
            sb.AppendLine("ScheduledOperation: ");
            foreach (ScheduledOperation task in details.ScheduledOperations.ToList())
            {
                sb.AppendLine("\t id: " + task.ScheduledOperationID.ToString());
                sb.AppendLine("\t\t type: " + task.OperationType);
                sb.AppendLine("\t\t server name: " + task.ServerName);
                sb.AppendLine("\t\t plan id: "
                    + task.ScheduledPlan.ScheduledPlanId);
                sb.AppendLine("\t\t plan status: "
                        + task.ScheduledPlan.ScheduledPlanStatus);
                sb.AppendLine("\t\t scheduled frequency type: "
                        + task.ScheduledPlan.ScheduleFrequencyType);
                sb.AppendLine("\t\t scheduled operation label: "
                        + task.ScheduledPlan.ScheduleOperationLabel);
                sb.AppendLine("\t\t first execution time: "
                        + task.ScheduledPlan.FirstExecutionTime);
                sb.AppendLine("\t\t last execution time: "
                        + task.ScheduledPlan.LastExecutionTime);
                sb.AppendLine("\t\t days of month: "
                        + task.ScheduledPlan.ScheduleDaysOfMonth);
                sb.AppendLine("\t\t montly recurrence: "
                        + task.ScheduledPlan.ScheduledMontlyRecurrence);
                sb.AppendLine("\t\t owner type: "
                        + task.ScheduledPlan.ScheduledOwnerType);
                sb.AppendLine("\t\t scheduled end time: "
                        + task.ScheduledPlan.ScheduleEndDateTime);
                sb.AppendLine("\t\t scheduled frequency: "
                        + task.ScheduledPlan.ScheduleFrequency);
                sb.AppendLine("\t\t scheduled days of week: "
                        + task.ScheduledPlan.ScheduleWeekDays);
            }
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }
    }
    catch
    (Exception ex)
    {
        //relaunches the generic error 
        throw new ApplicationException(ex.Message);
    }
    return sb.ToString();
}
//IWsEndUser.getServerDetails Method (JAVA)
public static String GetServerDetails(IWsEndUser client, int serverId)
{

    StringBuilder sb = new StringBuilder();

    try
    {
        //calls the getServerDetails method,
        //getting a WsResultOfServerDetails object 
        WsResultOfServerDetails result = client.getServerDetails(serverId);

        //if the call fails; it relaunches the error indicating the message
        if (result.isSuccess())
        {
            sb.append("SERVER DETAIL: ");

            //the values returned are stored into the ServerDetails object
            ServerDetails details = result.getValue();

            sb.append("Creation date: ")
                    .append(details.getCreationDate().toString());
            sb.append("Status: ")
                    .append(details.getServerStatus().value());
            sb.append("Number of CPU: ")
                    .append(details.getCPUQuantity().getQuantity());
            sb.append("RAM quantity: ")
                    .append(details.getRAMQuantity().getQuantity());
            sb.append("Type of hypervisor: ")
                    .append(details.getHypervisorType().value());

            sb.append("Network adapters: ");

            for (NetworkAdapter na : details.getNetworkAdapters().getNetworkAdapter())
            {
                sb.append("\t id: ").append(na.getId().toString());
                sb.append("\t\t Mac address: ").append(na.getMacAddress());
                sb.append("\t\t IP addresses: ");

                for (IPAddress ip : na.getIPAddresses().getIPAddress())
                {
                    sb.append("\t\t\t ").append(ip);
                }

                sb.append("\t\t type: ").append(na.getNetworkAdapterType().value());
                if (na.getVLan() != null)
                {
                    sb.append("\t\t VLan name: ")
                            .append(na.getVLan().getName());
                }
            }

            sb.append("Note: ").append(details.getNote());
            sb.append("OS Template: ").append(details.getOSTemplate().getName());

            sb.append("Virtual Disks: ");

            for (VirtualDisk vd : details.getVirtualDisks().getVirtualDisk())
            {
                sb.append("\t id: ").append(vd.getProductId());
                sb.append("\t\t size: ").append(vd.getSize());
                sb.append("\t\t type: ").append(vd.getResourceType().value());
            }

            sb.append("Number of active jobs: ").append(details.getActiveJobs().getJob().size());
            for (Job job : details.getActiveJobs().getJob())
            {
                sb.append(" Creation date: ").append(job.getCreationDate().toString());
                sb.append(" Id: ").append(job.getJobId().toString());
                sb.append(" Progress: ").append(job.getProgress().toString());
            }

            sb.append("ScheduledOperation: ");

            for (ScheduledOperation task : details.
                    getScheduledOperations().getScheduledOperation())
            {
                sb.append("\t id: ")
                        .append(task.getScheduledPlan().getScheduledPlanId().toString());
                sb.append("\t\t operation: ")
                        .append(task.getScheduledPlan().getScheduleOperationLabel());
                sb.append("\t\t Frequency: ")
                        .append(task.getScheduledPlan().getScheduleFrequency());
            }
        }
        else
        {
            throw new Exception(result.getResultMessage());
        }
    }
    catch (Exception ex)
    {
        //print the error
        System.out.println(ex);
    }

    return sb.toString();
}

Version
API: v2.8 URL: https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl
See also

API: v2.8 URL: https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl