# DeleteQueueItems

> Enables you to delete items with the New state from a specified [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview). Please note that in order to execute this method in Studio, the Robot has to be connected to Orchestrator and [the Robot role](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/default-roles#robot-role) needs **Edit**, **Create**, and **Delete** permissions on queues and **Delete** permissions on transactions. When this method is run, it uses the same authentication context as the Robot which executes it, inheriting its permissions.

Enables you to delete items with the New state from a specified [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview). Please note that in order to execute this method in Studio, the Robot has to be connected to Orchestrator and [the Robot role](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/default-roles#robot-role) needs **Edit**, **Create**, and **Delete** permissions on queues and **Delete** permissions on transactions. When this method is run, it uses the same authentication context as the Robot which executes it, inheriting its permissions.

## Definition

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

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

## Overloads

|  |  |
| --- | --- |
| `DeleteQueueItems(IEnumerable<QueueItem>)` | Enables you to delete items with the New state from a specified [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview). |
| `DeleteQueueItems(IEnumerable<QueueItem>, String)` | Enables you to delete items with the New state from a specified [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview), at a specified folder path. |
| `DeleteQueueItems(IEnumerable<QueueItem>, String, Int32)` | Enables you to delete items with the New state from a specified [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview), at a specified folder path, and with TimeoutMS configured. |

## `DeleteQueueItems(IEnumerable<QueueItem>)`

Enables you to delete items with the New state from a specified [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview).

```
void DeleteQueueItems(
    IEnumerable<QueueItem> queueItems
)
```

`queueItems` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) `QueueItem` : The list of items that you want to mark as deleted in Orchestrator. They must be in the 'New' state and should be retrieved via a [Get Queue Items](https://docs.uipath.com/activities/other/latest/user-guide/get-queue-items) method first.

## `DeleteQueueItems(IEnumerable<QueueItem>, String)`

Enables you to delete items with the New state from a specified [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview), at a specified folder path.

```
void DeleteQueueItems(
    IEnumerable<QueueItem> queueItems,
    string folderPath
)
```

`queueItems` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) `QueueItem` : The list of items that you want to mark as deleted in Orchestrator. They must be in the 'New' state and should be retrieved via a [Get Queue Items](https://docs.uipath.com/activities/other/latest/user-guide/get-queue-items) method first.

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

## `DeleteQueueItems(IEnumerable<QueueItem>, String, Int32)`

Enables you to delete items with the New state from a specified [Orchestrator queue](https://docs.uipath.com/orchestrator/docs/about-queues-and-transactions#section-queues-overview), at a specified folder path, and with TimeoutMS configured.

```
void DeleteQueueItems(
    IEnumerable<QueueItem> queueItems,
    string folderPath,
    int timeoutMS
)
```

`queueItems` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) `QueueItem` : The list of items that you want to mark as deleted in Orchestrator. They must be in the 'New' state and should be retrieved via a [Get Queue Items](https://docs.uipath.com/activities/other/latest/user-guide/get-queue-items) method first.

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

`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).
