Viewing preemption information
Use the following endpoint to view information about a job's preemptions:
- GET
/job/v1/jobs/{jobId}/preemptions
The /preemptions endpoint returns two main types of information:
- An array of job diffs
- Information about the preempting job
The diffs array
The diffs array identifies all of the changes between the base job
and the preempting job. These are the changes that are not in the preempted job but
would need to be for the preempted job to be bindable.
Each member of the array identifies one difference between the base job and the
preempting job. This includes the object (entity), the label of the
diff field (field), the base job value
(existingValue) and the preempting job value
(changedValue). The following code shows the syntax of each job
diff array member.
{
"changedValue": <value>,
"entity": {
"displayName": <display name>,
"id": <id>
},
"existingValue": <value>,
"field": <value>
}
The difference can pertain to the value of a single field. For example, the following
payload indicates that on a Medical Payments coverage object, the
choiceTerm1 field in the base job was 5000, but the preempting
job changed it to 15000.
{
"changedValue": "15,000",
"entity": {
"displayName": "Medical Payments",
"id": "85"
},
"existingValue": "5,000",
"field": "choiceTerm1"
}
The difference can also pertain to the addition or removal of an object. When this occurs, a "√" is used to indicate the object is present, and a "" (an empty string) is used to indicate the object is absent. For example, the following payload indicates that a 2000 Honda Civic was not present in the base job but was present in the preempting job. (In other words, the preempting job added a Honda Civic.)
{
"changedValue": "√",
"entity": {
"displayName": "2000 Honda Civic in California",
"id": "32"
},
"existingValue": "",
"field": "2000 Honda Civic in California"
},
The preempting job
The payload also includes information about the preempting job, including:
- The job itself
- The job's effective date
- The job number
- The job type