> ## 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.

# GetAvailableTasksByStageId

> List session tasks available at specified stages with the GetAvailableTasksByStageId method of the ABBYY FlexiCapture Web Services API, filtered by stage IDs.

## What it does

Gets a list of tasks of the current session available at the specified processing stages.

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

## Definition

```
Task [] GetAvailableTasksByStageId( int sessionId, int projectId, int[] stageIds, bool onlyPrivateBatches );
```

## Parameters

<table width="100%"><tbody><tr><td><p><strong>Name</strong></p></td><td><p><strong>Type</strong></p></td><td><p><strong>Description</strong></p></td></tr><tr><td><p>sessionId</p></td><td><p>int</p></td><td><p>The ID of the connection to the Application Server</p></td></tr><tr><td><p>projectId</p></td><td><p>int</p></td><td><p>The ID of the project for which the list of tasks is to be retrieved</p></td></tr><tr><td><p>stageIds</p></td><td><p>int\[]</p></td><td><p><a href="/flexi-capture/api/methods/get-available-queues">List of the IDs of the queues</a> to get task from</p></td></tr><tr><td><p>onlyPrivateBatches</p></td><td><p>bool</p></td><td><p>The flag which determines the set of available batches. Possible values:</p><ul><li><strong>True</strong> - only batches that belong the current user or user group are available;</li><li><strong>False</strong> - all batches are available.</li></ul></td></tr></tbody></table>

## Returned value

| **Type**                                      | **Description**         |
| --------------------------------------------- | ----------------------- |
| [Task](/flexi-capture/api/structures/task)\[] | List of available tasks |
