# GetQueueItems

> Enables you to retrieve a list of up to 100 transactions from an indicated Orchestrator queue, according to multiple filters, such as creation date, priority, state, and reference.

Enables you to retrieve a list of up to 100 transactions from an indicated [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview), according to multiple filters, such as creation date, priority, state, and reference. Obtaining a different set is possible with the use of **Pagination** configurations.

## Definition

**Namespace:** UiPath.Activities.System.API

**Assembly:** UiPath.System.Activities.Api (in UiPath.System.Activities.Api.dll)

## Overloads

|  |  |
| --- | --- |
| `GetQueueItems(String)` | Retrieves a list of transactions from a specified queue. |
| `GetQueueItems(String, String)` | Retrieves a list of transactions from a specified queue, and from a specific Orchestrator folder. |
| `GetQueueItems(String, String, Nullable<Int32>, Nullable<Date Time>,``Nullable<Int32>, QueueItemStates,` `Nullable<Date Time>, ReferenceFilterStrategy, String, Int32, Int32, Int32)` | Retrieves a list of transactions from an indicated queue, according to multiple filters, such as creation date, priority, state and reference. |

## `GetQueueItems(String)`

Retrieves a list of transactions from a specified queue.

```
IEnumerable<QueueItem> GetQueueItems(
    string queueName
)
```

**`queueName`** [String](https://learn.microsoft.com/dotnet/api/system.string) : The name of the queue you want to extract data from. The name has to be the same as the one in Orchestrator and needs to have the same capitalization.

## `GetQueueItems(String, String)`

Retrieves a list of transactions from a specified queue, and from a specific Orchestrator folder.

```
IEnumerable<QueueItem> GetQueueItems(
    string queueName,
    string folderPath
)
```

`queueName` [String](https://learn.microsoft.com/dotnet/api/system.string) : The name of the queue you want to extract data from. The name has to be the same as the one in Orchestrator and needs to have the same capitalization.

`folderPath` [String](https://learn.microsoft.com/dotnet/api/system.string) : [The path of the folder](https://docs.uipath.com/orchestrator/docs/about-folders) where specified queue is located, if different from the folder where the process is running. This field only supports string values, with `/` as the separator to indicate subfolders. For example `"Finance/Accounts Payable"`.

## `GetQueueItems(String, String, Nullable<Int32>, Nullable<Date Time>, Nullable<Int32>, QueueItemStates, Nullable<Date Time>, ReferenceFilterStrategy, String, Int32, Int32, Int32)`

Retrieves a list of transactions from an indicated queue, according to multiple filters, such as creation date, priority, state and reference.

```
IEnumerable<QueueItem> GetQueueItems(
    string queueName,
    string folderPath,
    int? duration,
    DateTime? from,
    int? priority,
    QueueItemStates queueItemStates,
    DateTime? to,
    ReferenceFilterStrategy filterStrategy,
    string reference,
    int skip,
    int top,
    int timeoutMS
)
```

`queueName` [String](https://learn.microsoft.com/dotnet/api/system.string) : The name of the queue you want to extract data from. The name has to be the same as the one in Orchestrator and needs to have the same capitalization.

`folderPath` [String](https://learn.microsoft.com/dotnet/api/system.string) : [The path of the folder](https://docs.uipath.com/orchestrator/docs/about-folders) where specified queue is located, if different from the folder where the process is running. This field only supports string values, with `/` as the separator to indicate subfolders. For example `"Finance/Accounts Payable"`.

`duration` [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt; : Filters transactions by the minimum time they spent in the previous attempt.

`from` [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt; : Filters transactions by the minimum creation date. It accepts `DateTime` values.

`priority` [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt; : Filters transactions according to their priority. This field supports only integers and integer variables. The priorities are as follows:

* `0 - High`
* `1 - Normal`
* `2 - Low`

`queueItemStates` QueueItemStates : Filters [the queue item states](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/queue-item-statuses). The following options are available:

* `All` - The default option.
* `New`
* `InProgress`
* `Failed`
* `Successful`
* `Abandoned`
* `Retried`
* `Deleted`

`to` [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt; : Filters transactions according to the maximum creation date. It accepts `DateTime` values.

`filterStrategy` ReferenceFilterStrategy : The strategy to use when filtering according to reference. The following options are available:

* `StartWith` - looks for items whose references start with the value indicated in the **Reference** field.
* `Equals` - looks for items whose references are the same as the value indicated in the **Reference** field.

`reference` [String](https://learn.microsoft.com/dotnet/api/system.string) : Filters [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview) items by reference.

`skip` [Int32](https://learn.microsoft.com/dotnet/api/system.int32) : Helps you skip the first "n" items.

`top` [Int32](https://learn.microsoft.com/dotnet/api/system.int32) : Returns only a specified number of items out of the total. The maximum value is 100.

`timeoutMS` [Int32](https://learn.microsoft.com/dotnet/api/system.int32) : Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 30000 milliseconds (30 seconds).

## Return value

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)`<QueueItem>`

The corresponding QueueItems.
