Get Job Definition Count (POST)

Queries for the number of job definitions that fulfill given parameters. This method takes the same message body as the Get Job Definitions (POST) method and therefore it is slightly more powerful than the Get Job Definition Count method.

Method

POST /job-definition/count

Parameters

Request Body

A JSON object with the following properties:

Name Description
jobDefinitionId Filter by job definition id.
activityIdIn Only include job definitions which belong to one of the passed activity ids.
processDefinitionId Only include job definitions which exist for the given process definition id.
processDefinitionKey Only include job definitions which exist for the given process definition key.
jobType Only include job definitions which exist for the given job type. See the User Guide for more information about job types.
jobConfiguration Only include job definitions which exist for the given job configuration. For example: for timer jobs it is the timer configuration.
active Only include active job definitions. Value may only be true, as false is the default behavior.
suspended Only include suspended job definitions. Value may only be true, as false is the default behavior.
withOverridingJobPriority Only include job definitions that have an overriding job priority defined. The only effective value is true. If set to false, this filter is not applied.
tenantIdIn Only include job definitions which belong to one of the passed and comma-separated tenant ids.
withoutTenantId Only include job definitions which belong to no tenant. Value may only be true, as false is the default behavior.
includeJobDefinitionsWithoutTenantId Include job definitions which belong to no tenant. Can be used in combination with tenantIdIn. Value may only be true, as false is the default behavior.

Result

A JSON object that contains the count as the only property.

Name Type 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 sortOrder parameter is supplied, but no sortBy. See the Introduction for the error response format.

Example

Request

POST /job-definition/count

Request Body:

{
  "activityIdIn": [
      "ServiceTask1", "ServiceTask2"
  ]
}

Response

{"count": 2}

On this Page: