Retrieves a job by id, according to the Job interface in the engine.

Method

GET /job/{id}

Parameters

Path Parameters

Name Description
id The id of the job to be retrieved.

Result

A JSON object corresponding to the Job interface in the engine.Its properties are as follows:

Name Value Description
id String The id of the job.
jobDefinitionId String The id of the associated job definition.
dueDate String The date on which this job is supposed to be processed.
processInstanceId String The id of the process instance which execution created the job.
executionId String The specific execution id on which the job was created.
processDefinitionId String The id of the process definition which this job belongs to.
processDefinitionKey String The key of the process definition which this job belongs to.
retries Number The number of retries this job has left.
exceptionMessage String The message of the exception that occurred, the last time the job was executed. Is null when no exception occurred.
suspended Boolean A flag indicating whether the job is suspended or not.
priority Number The job's priority for execution.
tenantId String The id of the tenant which this job belongs to.

Response Codes

Code Media type Description
200 application/json Request successful.
404 application/json Job with given id does not exist. See the Introduction for the error response format.

Example

Request

GET /job/aJobId

Response

  1. {
  2. "id": "aJobId",
  3. "dueDate": "2013-07-17T17:00:00",
  4. "processInstanceId": "aProcessInstanceId",
  5. "executionId": "anExecutionId",
  6. "retries": 0,
  7. "exceptionMessage": "An exception Message",
  8. "suspended": false,
  9. "priority": 10,
  10. "tenantId": null
  11. }

原文: https://docs.camunda.org/manual/7.9/reference/rest/job/get/