Skip to main content
POST
/
job
Get Jobs (POST)
curl --request POST \
  --url http://{host}:{port}/{contextPath}/job \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "dueDates": [
    {
      "operator": "gt",
      "value": "2018-07-17T17:00:00.000+0200"
    },
    {
      "operator": "lt",
      "value": "2018-07-17T18:00:00.000+0200"
    }
  ],
  "createTimes": [
    {
      "operator": "gt",
      "value": "2012-05-05T10:00:00.000+0200"
    },
    {
      "operator": "lt",
      "value": "2012-07-16T15:00:00.000+0200"
    }
  ],
  "sorting": [
    {
      "sortBy": "jobDueDate",
      "sortOrder": "asc"
    },
    {
      "sortBy": "jobRetries",
      "sortOrder": "asc"
    }
  ]
}'
[
  {
    "id": "aJobId",
    "jobDefinitionId": "aJobDefinitionId",
    "dueDate": "2018-07-17T17:05:00.000+0200",
    "processInstanceId": "aProcessInstanceId",
    "processDefinitionId": "aProcessDefinitionId",
    "processDefinitionKey": "aPDKey",
    "executionId": "anExecutionId",
    "retries": 0,
    "exceptionMessage": "An exception Message",
    "failedActivityId": "anActivityId",
    "suspended": false,
    "priority": 10,
    "tenantId": null,
    "createTime": "2018-05-05T17:00:00+0200",
    "batchId": "aBatchId"
  },
  {
    "id": "anotherJobId",
    "jobDefinitionId": "anotherJobDefinitionId",
    "dueDate": "2018-07-17T17:55:00.000+0200",
    "processInstanceId": "aProcessInstanceId",
    "processDefinitionId": "anotherPDId",
    "processDefinitionKey": "anotherPDKey",
    "executionId": "anotherExecutionId",
    "retries": 0,
    "exceptionMessage": "Another exception Message",
    "failedActivityId": "anotherActivityId",
    "suspended": true,
    "priority": 8,
    "tenantId": null,
    "createTime": "2018-05-05T17:00:00+0200",
    "batchId": null
  }
]

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

firstResult
integer

Pagination of results. Specifies the index of the first result to return.

maxResults
integer

Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.

Body

application/json

A Job instance query which defines a list of Job instances

jobId
string | null

Filter by job id.

jobIds
string[] | null

Filter by a list of job ids.

jobDefinitionId
string | null

Only select jobs which exist for the given job definition.

processInstanceId
string | null

Only select jobs which exist for the given process instance.

processInstanceIds
string[] | null

Only select jobs which exist for the given list of process instance ids.

executionId
string | null

Only select jobs which exist for the given execution.

processDefinitionId
string | null

Filter by the id of the process definition the jobs run on.

processDefinitionKey
string | null

Filter by the key of the process definition the jobs run on.

activityId
string | null

Only select jobs which exist for an activity with the given id.

withRetriesLeft
boolean | null

Only select jobs which have retries left. Value may only be true, as false is the default behavior.

executable
boolean | null

Only select jobs which are executable, i.e., retries > 0 and due date is null or due date is in the past. Value may only be true, as false is the default behavior.

timers
boolean | null

Only select jobs that are timers. Cannot be used together with messages. Value may only be true, as false is the default behavior.

messages
boolean | null

Only select jobs that are messages. Cannot be used together with timers. Value may only be true, as false is the default behavior.

dueDates
object[] | null

Only select jobs where the due date is lower or higher than the given date.

createTimes
object[] | null

Only select jobs created before or after the given date.

withException
boolean | null

Only select jobs that failed due to an exception. Value may only be true, as false is the default behavior.

exceptionMessage
string | null

Only select jobs that failed due to an exception with the given message.

failedActivityId
string | null

Only select jobs that failed due to an exception at an activity with the given id.

noRetriesLeft
boolean | null

Only select jobs which have no retries left. Value may only be true, as false is the default behavior.

active
boolean | null

Only include active jobs. Value may only be true, as false is the default behavior.

suspended
boolean | null

Only include suspended jobs. Value may only be true, as false is the default behavior.

priorityLowerThanOrEquals
integer | null

Only include jobs with a priority lower than or equal to the given value. Value must be a valid long value.

priorityHigherThanOrEquals
integer | null

Only include jobs with a priority higher than or equal to the given value. Value must be a valid long value.

tenantIdIn
string[] | null

Only include jobs which belong to one of the passed tenant ids.

withoutTenantId
boolean | null

Only include jobs which belong to no tenant. Value may only be true, as false is the default behavior.

includeJobsWithoutTenantId
boolean | null

Include jobs which belong to no tenant. Can be used in combination with tenantIdIn. Value may only be true, as false is the default behavior.

sorting
object[] | null

An array of criteria to sort the result by. Each element of the array is an object that specifies one ordering. The position in the array identifies the rank of an ordering, i.e., whether it is primary, secondary, etc. Does not have an effect for the count endpoint.

Response

Request successful.

id
string | null

The id of the job.

jobDefinitionId
string | null

The id of the associated job definition.

dueDate
string<date-time> | null

The date on which this job is supposed to be processed.

processInstanceId
string | null

The id of the process instance which execution created the job.

executionId
string | null

The specific execution id on which the job was created.

processDefinitionId
string | null

The id of the process definition which this job belongs to.

processDefinitionKey
string | null

The key of the process definition which this job belongs to.

retries
integer | null

The number of retries this job has left.

exceptionMessage
string | null

The message of the exception that occurred, the last time the job was executed. Is null when no exception occurred.

failedActivityId
string | null

The id of the activity on which the last exception occurred, the last time the job was executed. Is null when no exception occurred.

suspended
boolean | null

A flag indicating whether the job is suspended or not.

priority
integer | null

The job's priority for execution.

tenantId
string | null

The id of the tenant which this job belongs to.

createTime
string<date-time> | null

The date on which this job has been created.

batchId
string | null

The ID of the batch associated with this job. null if no batch is associated with this job. The following jobs are associated with batches:

  • Seed Jobs
  • Monitor Jobs
  • Batch Execution Jobs