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

# GetBatches

> List all batches in a project with the GetBatches method of the ABBYY FlexiCapture Web Services API, optionally limited to the current user or group.

## What it does

Gets information about all the batches in a project.

## Definition

```
Batch [] GetBatches( int projectId, int sessionId, 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>projectId</p></td><td><p>int</p></td><td><p>The ID of the project that contains the batches about which information is to be retrieved</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>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

<table width="100%"><tbody><tr><td><p><strong>Type</strong></p></td><td><p><strong>Description</strong></p></td></tr><tr><td><p><a href="/flexi-capture/api/structures/batch-api-structures">Batch</a>\[]</p></td><td><p>A set of records, each containing information about one of the batches in the project.</p><p>The returned set does not include batches created in the Web Capture Station.</p></td></tr></tbody></table>
