GetFilteredBatches

What it does

Requests a filtered set of batches from a server in groups. For example, you can send a request that looks as follows: "return 100 batches that are at the recognition stage starting from the 500th batch."

Definition

int GetFilteredBatches(int sessionId, int projectId, int batchTypeId, int[] stageTypes, int[] stageExtIds, string name, int batchPurpose, long startDate, long stopDate, long slaDateBeginRange, long slaDateEndRange, int slaStateFlags, int firstRecord, int recordsCount, RegistrationProperty[] filterRegParams, out Batch[] batches)

Parameters

Name Type Description
sessionId int The ID of the connection to the Application Server
projectId int The ID of the project that contains the batch types about which information is to be retrieved
batchTypeId int

The ID of the batch type

  • 0 - batch by default
  • -1 - all batch types
stageTypes int []

The set of stage types (for possible values, see ProcessingStage) that have the batches you are looking for

  • Empty set - all batches
  • 0 - batches that are not at any particular stage
stageExtIds int []

The set of stage IDs (the Id field in the ProcessingStage structure) that have the batches you are looking for

  • Empty set - all batches
  • 0 - batches that are not at any particular stage
name string The prefix of the batch name. An empty line signifies that any names are allowed
batchPurpose int

The purpose of the batch

Possible values:

  • 0 - batches with data
  • 1 - batches for training Document Definition matching
  • 2 - batches for training classifiers
startDate long

Batches that were created later than the specified date, 0 stands for all batches

For conversion, use the following methods (the example below is in C#):

DateTime dtTime;
long lTime;
...
// conversion from DataTime to long
dTime = DataTime.FromFileTime(lTime);
...
// conversion from long to DataTime
lTime = dTime.ToFileTime();

stopDate long

Batches that were created not earlier than the specified date, 0 stands for all batches

For conversion, use the following methods (the example below is in C#):

DateTime dtTime;
long lTime;
...
// conversion from DataTime to long
dTime = DataTime.FromFileTime(lTime);
...
// conversion from long to DataTime
lTime = dTime.ToFileTime();

slaDateBeginRange long

Batches with the processing end date under an SLA not earlier than the specified date, 0 stands for all batches

For conversion, use the following methods (the example below is in C#):

DateTime dtTime;
long lTime;
...
// conversion from DataTime to long
dTime = DataTime.FromFileTime(lTime);
...
// conversion from long to DataTime
lTime = dTime.ToFileTime();

slaDateEndRange long

Batches with the processing end date under an SLA not later than the specified date, 0 stands for all batches

For conversion, use the following methods (the example below is in C#):

DateTime dtTime;
long lTime;
...
// conversion from DataTime to long
dTime = DataTime.FromFileTime(lTime);
...
// conversion from long to DataTime
lTime = dTime.ToFileTime();

slaStateFlags int

Contains a warning about a batch processing deadline

The following values or their logical sum (OR) is admissible:

  • 0 - batches are not filtered by this attribute
  • 1 - batches without a specified processing deadline
  • 2 - batches with a processing deadline that is neither approaching nor approached
  • 4 - batches with an approaching processing deadline
  • 8 - batches with an approached processing deadline
firstRecord int

The first record in the list

(Records are numbered starting from the zero element)

recordsCount int The number of batches that a user tries to obtain
filterRegParams RegistrationProperty[]

The set of "name–value" pairs that is used to filter by registration parameters

(It is permitted to send only 5 value pairs, other pairs will be ignored)

Hinweis. Batches are sorted in the descending order of IDs, meaning that the latest batches are returned at the top of the list.

Returned value

Type Description
int The number of batches on the server that match the specified filter criteria
Batch[] The set of completed Batch structures

12.04.2024 18:16:01

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.