Activate Jobs of a specific type
GET /jobs
Will activate available jobs of the specific type, and returns the activated jobs.
If no jobs of this type are available, then the connection may be kept open until one or more jobs become available, or the request times out due to long polling.
Query Parameters
- type string required
The type of the job to activate
- maxJobsToActivate int32
Default value:
32
The maximum number of jobs to activate in this request
- worker string
Default value:
default
The name of the worker requesting to activate the jobs
- jobTimeout string
Default value:
5m
Examples:Duration during which the activated jobs are claimed by this worker
- durationTenSeconds
- durationFiveMin
- durationOneAndAHalfHour
Duration of ten seconds
Example:
10s
Duration of five minutes
Example:
5m
Duration of one hour and thirty minutes
Example:
1h30m
- fetchVariables string[]
Names of the variables to fetch with each job.
If empty, all visible variables at the time of activation for the scope of the job will be returned.
- 200
- 503
Zero or more jobs activated
- application/json
- Schema
- Example (from schema)
Schema
data object
jobs object[]
Array [key int64Key of the job
status stringPossible values: [
activatable
,activated
,failed
,error_thrown
,completed
]The status of the job
type stringType of the job
processInstanceKey int64Key of the process instance which this job belongs to
bpmnProcessId stringBPMN process id of the process which this job belongs to
processDefinitionVersion int32Version number of the process which this job belongs to
processDefinitionKey int64Key of the process which this job belongs to
elementId stringId of the element in the process which this job belongs to
elementInstanceKey int64Key of the element instance which this job belongs to
customHeaders objectSet of custom headers defined during modelling; returned as a serialized JSON document
worker stringName of the worker that activated this job
retries int32Number of retries left for this job
deadline int64UNIX epoch timestamp specifying when the job can be activated again
variables objectJSON document consisting of all variables visible to the task scope at the time of job activation
]- error string
{
"data": {
"jobs": [
{
"key": 0,
"status": "activatable",
"type": "string",
"processInstanceKey": 0,
"bpmnProcessId": "string",
"processDefinitionVersion": 0,
"processDefinitionKey": 0,
"elementId": "string",
"elementInstanceKey": 0,
"customHeaders": {},
"worker": "string",
"retries": 0,
"deadline": 0,
"variables": {}
}
]
},
"error": "string"
}
Unable to connect to Zeebe cluster