Get External Task Count
Queries for the number of external tasks that fulfill given parameters. Takes the same parameters as the Get External Tasks method.
Method
GET /external-task/count
Parameters
Query Parameters
Name | Description |
---|---|
externalTaskId | Filter by an external task's id. |
topicName | Filter by an external task topic. |
workerId | Filter by the id of the worker that the task was most recently locked by. |
locked | Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). Value may only be true , as false matches any external task. |
notLocked | Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). Value may only be true , as false matches any external task. |
withRetriesLeft | Only include external tasks that have a positive (> 0) number of retries (or null ). Value may only be true , as false matches any external task. |
noRetriesLeft | Only include external tasks that have 0 retries. Value may only be true , as false matches any external task. |
lockExpirationAfter | Restrict to external tasks that have a lock that expires after a given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss , e.g., 2013-01-23T14:42:45 . |
lockExpirationBefore | Restrict to external tasks that have a lock that expires before a given date. The date must have the format yyyy-MM-dd'T'HH:mm:ss , e.g., 2013-01-23T14:42:45 . |
activityId | Filter by the id of the activity that an external task is created for. |
activityIdIn | Filter by the comma-separated list of ids of the activities that an external task is created for. |
executionId | Filter by the id of the execution that an external task belongs to. |
processInstanceId | Filter by the id of the process instance that an external task belongs to. |
processDefinitionId | Filter by the id of the process definition that an external task belongs to. |
tenantIdIn | Filter by a comma-separated list of tenant ids. An external task must have one of the given tenant ids. |
active | Only include active tasks. Value may only be true , as false matches any external task. |
suspended | Only include suspended tasks. Value may only be true , as false matches any external task. |
priorityHigherThanOrEquals | Only include jobs with a priority higher than or equal to the given value. Value must be a valid long value. |
priorityLowerThanOrEquals | Only include jobs with a priority lower than or equal to the given value. Value must be a valid long value. |
Result
A JSON object that contains the count as the only property.
Name | Value | Description |
---|---|---|
count | Number | The number of matching external tasks. |
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 /external-task/count?topicName=aTopic
Response
{"count": 42}