# GetEDXTaskStatus Method

## Overloads

| [GetEDXTaskStatus(Guid, Guid)](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api6.IQMS6.GetEDXTaskStatus.htm#PIX_Services_V12_Api6_IQMS6_GetEDXTaskStatus_System_Guid_System_Guid_) |  | Gets the EDX task status. |
| --- | --- | --- |

[](https://help.qlik.com/en-US/qlikview-developer/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api6.IQMS6.GetEDXTaskStatus.htm) [](https://help.qlik.com/en-US/qlikview-developer/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api6.IQMS6.GetEDXTaskStatus.htm)

## GetEDXTaskStatus(Guid, Guid)

Gets the EDX task status.

### Declaration

```

          EDXStatus GetEDXTaskStatus(Guid qdsID, Guid executionID)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.Guid | qdsID | The QDS ID. |
| System.Guid | executionID | The execution instance ID. |

### Returns

| Type | Description |
| --- | --- |
| [EDXStatus](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.QMSAPI.DataObjects.EDXStatus.htm) | The status of a specific execution of the task. |

### Remarks

##### security

Requires membership of local group *QlikView EDX*.

### Examples

The following example shows how to trigger a task and then wait until it has finished or a certain amount of time has passed.

The service key injection is assumed to be handled behind the scenes. For an example of how to inject the service key, see Samples.

```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using QMSAPI;

class Program
{
    static void Main(string[] args)
    {
        try
        {
            // create a QMS API client
            IQMS apiClient = new QMSClient();

            //retrieve a time limited service key
            ServiceKeyClientMessageInspector.ServiceKey = apiClient.GetTimeLimitedServiceKey();

           //Get a Distribution Service.
           ServiceInfo qdsService = apiClient.GetServices(ServiceTypes.QlikViewDistributionService).FirstOrDefault();

           if (qdsService != null)
           {
               //Trigger the task
               TriggerEDXTaskResult result = apiClient.TriggerEDXTask(qdsService.ID, "PauseEDX", "edx", "", new List<string>());

               EDXStatus executionStatus = null;

               //Wait until the task is completed or 60 seconds has passed.
               SpinWait.SpinUntil(() =>
                   {
                       System.Threading.Thread.Sleep(1000);
                       Console.WriteLine("Checking the task...");

                       //Get the current state of the task.
                       executionStatus = apiClient.GetEDXTaskStatus(qdsService.ID, result.ExecId);

                       //Return true if the task has completed.
                       return executionStatus != null && executionStatus.TaskStatus == TaskStatusValue.Completed;
               }, 60 * 1000);

               //Write the result
               if (executionStatus != null)
                   Console.WriteLine(executionStatus.TaskStatus);
               else
                   Console.WriteLine("Failed to get execution status.");

           }
        }
        catch (Exception ex)
        {
            Console.WriteLine("An exception occurred: " + ex.Message);
        }
        // wait for user to press any key
        Console.ReadLine();
    }
}
```

### See Also

[EDXStatus](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.EDXStatus.htm)

[TriggerEDXTask(Guid, String, String, String, List<String>)](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api6.IQMS6.TriggerEDXTask.htm#PIX_Services_V12_Api6_IQMS6_TriggerEDXTask_System_Guid_System_String_System_String_System_String_System_Collections_Generic_List_System_String__)