# RemoteGetTaskListForDocID Method

## Overloads

| [RemoteGetTaskListForDocID(Guid, Guid)](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.Services.V12.Api6.IQMS6.RemoteGetTaskListForDocID.htm#PIX_Services_V12_Api6_IQMS6_RemoteGetTaskListForDocID_System_Guid_System_Guid_) |  | Retrieves a list of all tasks for a specific document from a remote QlikView Management Service. |
| --- | --- | --- |

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

## RemoteGetTaskListForDocID(Guid, Guid)

Retrieves a list of all tasks for a specific document from a remote QlikView Management Service.

### Declaration

```

          List<TaskInfo> RemoteGetTaskListForDocID(Guid remoteQmsId, Guid documentId)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.Guid | remoteQmsId | The ID of the remote QlikView Management Service. |
| System.Guid | documentId | The ID of the document to retrieve tasks for. |

### Returns

| Type | Description |
| --- | --- |
| System.Collections.Generic.List&lt;[TaskInfo](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.QMSAPI.DataObjects.TaskInfo.htm)&gt; | A list of TaskInfo's, [TaskInfo](https://help.qlik.com/en-US/qlikview-developer/September2026/Subsystems/QMSAPIref/Content/PIX.QMSAPI.DataObjects.TaskInfo.htm) |

### Remarks

##### security

Requires membership of local group *QlikView Management API* and the role *Document Folder Administrator*.

### Examples

The example below retrieves tasks from a document from a remote QlikView Management Service.

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 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();

            //Create GUIDs for a known QMS and document
            Guid remoteQMSId = new Guid("c7c66836-f00b-47c4-8099-23ff7f178423"); // The remote QMS QVS ID.
            Guid documentId = new Guid ("12a32214-1122-112a-8099-8765ce564112"); // The document ID.

            //Get the document tasks
            List<TaskInfo> taskInfos = apiClient.RemoteGetTaskListForDocID(remoteQMSId, documentId);

            //Print the tasks to the console.
            taskInfos.ForEach( delegate(TaskInfo task)
                {
                    Console.WriteLine(string.Format("Name:{0}\nID:{1}Enabled:{2}\nType:{3}\n",task.Name, task.ID, task.Enabled, task.Type));
                }
            );
        }
        catch (Exception ex)
        {
            Console.WriteLine("An exception occurred: " + ex.Message);
        }
        // wait for user to press any key
        Console.ReadLine();
    }
}
```