The deleteJobExecutions method
Deletes one or more job executions.
deleteJobExecutions(executionId)
| Field | Use | Type | Description | Example Value |
|---|---|---|---|---|
| executionId | Required | List | List of job execution identifiers | [0a58c33d002ce9080000010e0ccf7b01800e, 0a59c33d002ce9080060010e0cdf7b01802r] |
| Type | Description |
|---|---|
Boolean |
True or False based on whether
the method runs successfully. |
Example
This example deletes the executions for the Reports job.
from pes.util.PESExceptions import *
from pes.api.PESImpl import PESImpl
pesImpl = PESImpl(user = "admin", password = "[{AES}KrY+KLlOYo4O6545tgGsYQ==]", host = "localhost", port = "8080", appserver_type = "websphere")
executions = pesImpl.getJobExecutionList(source="/Demo/Jobs/Reports")
execRows = executions.getRows()
# Get the execution ID from the execution history
deleteList = []
for exrow in execRows :
uuid = exrow.getEventObjId()
deleteList.append(uuid)
if len(deleteList) != 0:
print print('Deleting ',len(deleteList) ,' histories')
pesImpl.deleteJobExecutions(deleteList)