Get Batch Statistics

Queries for batch statistics that fulfill given parameters. Parameters may be the properties of batches, such as the id or type. The size of the result set can be retrieved by using the Get Batch Statistics Count method.

Method

GET /batch/statistics

Parameters

Query Parameters

Name Description
batchId Filter by batch id.
type Filter by batch type. See the User Guide for more information about batch types.
tenantIdIn Filter by a comma-separated list of tenant ids. A batch matches if it has one of the given tenant ids.
withoutTenantId Only include batches which belong to no tenant. Value can effectively only be true, as false is the default behavior.
suspended A Boolean value which indicates whether only active or suspended batches should be included. When the value is set to true, only suspended batches will be returned and when the value is set to false, only active batches will be returned.
createdBy Only include batches that were started by this user id.
startedBefore Only include batches that were started before the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
startedAfter Only include batches that were started after the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
withFailures Only include batches having jobs with failures. Value can only be true.
withoutFailures Only include batches having jobs without failures. Also returns batches without jobs. Value can only be true.
sortBy Sort the results lexicographically by a given criterion. Valid values are batchId, tenantId and startTime. Must be used in conjunction with the sortOrder parameter.
sortOrder Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
firstResult Pagination of results. Specifies the index of the first result to return.
maxResults Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

* For further information, please see the documentation.

Result

A JSON array of batch statistics objects. Each batch statistics object has the following properties:

Name Type Description
id String The id of the batch.
type String The type of the batch. See the User Guide for more information about batch types.
totalJobs Number The total jobs of a batch is the number of batch execution jobs required to complete the batch.
jobsCreated Number The number of batch execution jobs already created by the seed job.
batchJobsPerSeed Number The number of batch execution jobs created per seed job invocation. The batch seed job is invoked until it has created all batch execution jobs required by the batch (see totalJobs property).
invocationsPerBatchJob Number Every batch execution job invokes the command executed by the batch invocationsPerBatchJob times. E.g., for a process instance migration batch this specifies the number of process instances which are migrated per batch execution job.
seedJobDefinitionId String The job definition id for the seed jobs of this batch.
monitorJobDefinitionId String The job definition id for the monitor jobs of this batch.
batchJobDefinitionId String The job definition id for the batch execution jobs of this batch.
suspended Boolean Indicates wheter this batch is suspended or not.
tenantId String The tenant id of the batch.
createUserId String The batch creator's user id.
startTime String The time the batch was started. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ.
executionStartTime String The time the batch execution was started, i.e., at least one batch job has been executed. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ.
remainingJobs Number The number of remaining batch execution jobs. This does include failed batch execution jobs and batch execution jobs which still have to be created by the seed job.
completedJobs Number The number of completed batch execution jobs. This does include aborted/deleted batch execution jobs.
failedJobs Number The number of failed batch execution jobs. This does not include aborted or deleted batch execution jobs.

* For further information, please see the documentation.

Response codes

Code Media type Description
200 application/json Request successful.
400 application/json Returned if some of the query parameters are invalid, for example if a sortOrder parameter is supplied, but no sortBy. See the Introduction for the error response format.

Example

Request

GET /batch/statistics?type=aBatchType&sortBy=batchId&sortOrder=asc

Response

Status 200.

[
  {
    "id": "aBatchId",
    "type": "aBatchType",
    "totalJobs": 10,
    "batchJobsPerSeed": 100,
    "jobsCreated": 10,
    "invocationsPerBatchJob": 1,
    "seedJobDefinitionId": "aSeedJobDefinitionId",
    "monitorJobDefinitionId": "aMonitorJobDefinitionId",
    "batchJobDefinitionId": "aBatchJobDefinitionId",
    "suspened": false,
    "tenantId": "aTenantId",
    "createUserId": "aUserId",
    "startTime":"2013-01-23T13:42:42.000+0200",
    "executionStartTime":"2013-01-23T13:42:43.000+0200",
    "remainingJobs": 3,
    "completedJobs": 7,
    "failedJobs": 1
  }
]

On this Page: