> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GetAvailableTasksByStageIdExt

> GetAvailableTasksByStageIdExt method in the ABBYY FlexiCapture Web Services API lists tasks available at the specified processing stages.

## What it does

Gets a list of tasks available at the specified processing stages. The set of available batches can be restricted.

<Note>
  If the stage allows Web stations, only preprocessed tasks are added to the list.
</Note>

## Definition

```csharp theme={null}
TaskListExt GetAvailableTasksByStageIdExt(int sessionId, int projectId, int[] stageIds, int stageID_count, bool onlyPrivateBatches);
```

## Parameters

| Name                 | Type    | Description                                                                                                                                                                  |
| -------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sessionId`          | `int`   | The ID of the connection to the Application Server.                                                                                                                          |
| `projectId`          | `int`   | The ID of the project for which the list of tasks is retrieved.                                                                                                              |
| `stageIds`           | `int[]` | The IDs of the [stages](/flexi-capture/api/structures/processing-stage) to get tasks from.                                                                                   |
| `stageID_count`      | `int`   | The number of stages.                                                                                                                                                        |
| `onlyPrivateBatches` | `bool`  | A flag that determines the set of available batches. `True` makes available only batches that belong to the current user or user group. `False` makes all batches available. |

## Returned value

| Type                                                       | Description              |
| ---------------------------------------------------------- | ------------------------ |
| [TaskListExt](/flexi-capture/api/structures/task-list-ext) | List of available tasks. |
