Get Job Count
Queries for the number of jobs that fulfill given parameters. Takes the same parameters as the Get Jobs method.
Method
GET /job/count
Parameters
Query Parameters
| Name | Description | 
|---|---|
| jobId | Filter by job id. | 
| jobDefinitionId | Only select jobs which exist for the given job definition. | 
| processInstanceId | Only select jobs which exist for the given process instance. | 
| executionId | Only select jobs which exist for the given execution. | 
| processDefinitionId | Filter by the id of the process definition the jobs run on. | 
| processDefinitionKey | Filter by the key of the process definition the jobs run on. | 
| activityId | Only select jobs which exist for an activity with the given id. | 
| withRetriesLeft | Only select jobs which have retries left. Value may only be true, asfalseis the default behavior. | 
| executable | Only select jobs which are executable, i.e., retries > 0 and due date is nullor due date is in the past. Value may only betrue, asfalseis the default behavior. | 
| timers | Only select jobs that are timers. Cannot be used together with messages. Value may only betrue, asfalseis the default behavior. | 
| messages | Only select jobs that are messages. Cannot be used together with timers. Value may only betrue, asfalseis the default behavior. | 
| dueDates | Only select jobs where the due date is lower or higher than the given date.
    Due date expressions are comma-separated and are structured as follows: A valid condition value has the form operator_value.operatoris the comparison operator to be used andvaluethe date value as string.Valid operator values are: gt- greater than;lt- lower than.valuemay not contain underscore or comma characters. | 
| withException | Only select jobs that failed due to an exception. Value may only be true, asfalseis the default behavior. | 
| exceptionMessage | Only select jobs that failed due to an exception with the given message. | 
| noRetriesLeft | Only select jobs which have no retries left. Value may only be true, asfalseis the default behavior. | 
| active | Only include active jobs. Value may only be true, asfalseis the default behavior. | 
| suspended | Only include suspended jobs. Value may only be true, asfalseis the default behavior. | 
| priorityLowerThanOrEquals | Only include jobs with a priority lower than or equal to the given value. Value must be a valid longvalue. | 
| priorityHigherThanOrEquals | Only include jobs with a priority higher than or equal to the given value. Value must be a valid longvalue. | 
| tenantIdIn | Only include jobs which belong to one of the passed and comma-separated tenant ids. | 
| withoutTenantId | Only include jobs which belong to no tenant. Value may only be true, asfalseis the default behavior. | 
| includeJobsWithoutTenantId | Include jobs which belong to no tenant. Can be used in combination with tenantIdIn. Value may only betrue, asfalseis the default behavior. | 
Result
A JSON object that contains the count as the only property.
| Name | Value | Description | 
|---|---|---|
| count | Number | The number of matching executions. | 
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 sortOrderparameter is supplied, but nosortBy, or if an invalid operator for due date comparison is used. See the Introduction for the error response format. | 
Example
Request
GET /job/count?dueDates=gt_2012-07-17T17:00:00.000+0200,lt_2012-07-17T18:00:00.000+0200
Response
{"count": 2}